He often acted as Hercules' charioteer and companion, and the closeness of their relationship was such that he was known as Heracles' symbomos (altar-sharer), since the two could be honored at one and the same altar — a very rare occurrence in ancient Greece, where each divinity would have his or her own altar.
Iolaus was called the eromenos (beloved boy) of Hercules, and was thus a Sacred Hero of same-sex love in Thebes. Hercules, Iolaus and Eros were often depicted together.
That is probably why the army of gay lovers was called the Sacred Band, since they took their oath of allegiance at the Sacred Tomb of Iolaus, which was at the same time a shared sacred altar to Hercules. In effect, the warriors were swearing that they would fight alongside their comrades the same way Iolaus and Hercules fought togethe