It comes from the Latin word "com-," which means "with," "together," or "jointly." This reflects the original meaning of "company," which was a group of people who were together, especially for a particular purpose.
The full etymology is:
* Latin: *com-*, meaning "with," "together," or "jointly"
* Old French: *compaignie*, meaning "companionship"
* Middle English: *compaignie*, meaning "companionship," "company"
* Modern English: *company*
So, "company" essentially means "being with others," or "being in the company of others."