The Left thinks homosexuality is biological. (It’s one of the few things the left reckons is biological.) The Right thinks is is learned. In this case, it looks like the left happens to be correct.
According to David Barash in The Chronicle of Higher Education, homosexuality exists among other animals and across many human cultures. Within families it is less likely between adopted (unrelated) siblings than related siblings, and in turn more likely between twins. All these are good indications of it being innate or biological.
No “gay gene” has been found. That is not surprising since genes are usually like bricks: one brick does not make a wall. Also, there seem to be different sources of male homosexuality and lesbianism.
But explaining why it evolved is a real puzzle.
Barash lists a few hypotheses: that gays helped kin so increasing their fitness; that they aided their groups so increasing group selection. Not very convincing.
Maybe more likely is “sexually antagonistic selection”:
A fitness detriment when genes exist in one sex—say, gay males—could be more than compensated for by a fitness enhancement when they exist in another sex. … One study has found that female relatives of gay men have more children than do those of straight men.
But this only applies one-way, not to the male relatives of lesbians. So the origin of lesbianism is a mystery.
All this is treated at length in David P. Barash, Homo Mysterious: Evolutionary Puzzles of Human Nature (Oxford University Press, 2012), which looks at the ever-fascinating topics of sex, art, and religion.