The following is taken from a Usenet post in which I mused on the reasons why homosexual behavior occurs naturally in many species, including humans.
===========================================================================
Homosexual behavior can be adaptive behavior in members of a species in
several ways.
The simplest way is that it forms and cements affinitive bonds between members of the same sex. Remember that in Nature (and in primitive human societies) few individuals are wholly homosexual; what is more common is bisexual behavior in which frequency of hetrosexual intercourse is reduced, or homosexual behavior engaged in when hetrosexual intercourse is impossible owing to the unavailability of suitable females. This is strongly seen in bonobos (our close relatives), who use female homosexual intercourse to cement political alliances.
Another way is that it reduces tensions caused by an inability to mate with a female. This is most common in "harem" herd species such as many ungulates, where only a minority of the males get to mate in any mating season. Homosexual behavior is here used as a "consolation prize" to prevent bulls that are not likely to win a mating battle from getting so frustrated that they launch suicidal attacks, which would only reduce their future mating prospects while possibly damaging a
worthier bull.
Finally, in a social group, since the more homosexual a human's orientation the less children he or she will produce (on the average), and since humans normally bias their assistance toward their own children, the existence of a few (5-10 percent) group members who are primarily homosexual creates a "reserve" of effort for the group as a whole (and remember that most members of the group are the homosexual's close kin). This reserve is important because it is not committed to
any specific children: hence under extremely bad circumstances (such as a harsh winter) it represents some "slack" that can be made up without any children or elders having to perish. The homosexual himself is less likely to pass on his genotype, but because he aids his group's surivival he makes it more likely that other copies of all of the genes in his genotype will survive.
Think of it as "selfish altruism" in action.
END