a companion or partner: someone joined to another by a shared bond, a common undertaking, or an alliance.
The idea underneath this word is being joined together. From that one root grows the whole range: a close companion, a partner in some shared venture, and even whole groups bound into one body. What ties the uses together is the joining itself, not any warm feeling. That is why the same word can name a trusted friend, a business partner, an accomplice in crime, or allied tribes.
Because the bond is the point and not the mood, the word runs from good company to bad. It describes the friends a shepherd keeps and fellow worshipers who fear God, but it just as easily describes officials who have thrown in with thieves or a person who has become a partner to someone bent on ruin. The reader has to look at the context to tell whether the partnership is honorable or shameful.
At its widest the word reaches past individuals to describe groups. Tribes are called one another's companions when they stand together, and a crowd can be knit together as allies acting as a single man. In every case the word is drawing a line around who belongs with whom.