Earlier quoted context omitted.
Exclusive homosexuality is found in nearly 10% of male sheep, as well as a bunch of other species of mammals and birds. What’s interesting with the giraffes is the really high prevalence (94%), which suggests it’s an adaptation to some form of natural selection. Even the rate of 10% would suggest an adaptive response, but the really high rate emphasizes this.
One way in which it could be an adaption that actually helps its bearer's genes would be as an overpopulation safety valve. Instead of the whole group starving (all of them closely related genes), pause breeding for a while? I would expect that most species that have some form of throttling reaction like that would apply the brakes to female fertility because that is also relevant for individual survival, but it shou…
But it's not the only one. Another is that species that employ K strategy (low reproduction rates, high investment into offspring to ensure its survival) and that are social, gradually develop some kind of social safety net mechanisms for offspring, in cases where e.g. the parent dies or is sick and unable to provide proper care. One way to do that is to have some proportion of the population that does not breed on their own, thus ensuring that they are always available to rear others' offspring. Since evolution generally takes the path of least resistance, it's easier to achieve this by redirecting sexual drive than by switching it off entirely. And this can even make sense from a "selfish gene" perspective of one individual, because if you help enough of your close relatives (who share many genes with you) keep their kids alive, it may actually be more effective than betting on a few children of your own surviving to carry more shared genes.
(If this theory is right, that has interesting implications for all those laws restricting adoption by same-sex parents...)