ref
Middle English: from Old French compaignon, literally ‘one who breaks bread with another’, based on Latin com- ‘together with’ + panis ‘bread’.
From companion + -ship
companionship (n.)
"fellowship, association, company," 1540s, from companion + -ship.