Time magazine has a long article on Why Some People Are Gay: Notes (and Clues) from the Animal Kingdom.
We have known for at least a decade that hundreds of animal species — including birds, reptiles, mollusks and, of course, humans — engage in same-gender sexual acts. But no one is quite sure why....
One particularly charged finding is that in most species besides humans, same-gender pairings rarely lead to lifelong relationships. In other words, when one attractive bonobo male eyes another in a lovely patch of Congo swamp forest, they occasionally kiss and then move on to other oral pleasures, but they don't bother anyone afterward about trying to legalize their right to an open-banana-bar ceremony. In fact, they are likely to move on to girl bonobos: most animals that engage in same-gender sex acts do so only when an opposite-sex partner is unavailable.... And yet the study's authors, Nathan Bailey and Marlene Zuk of UC Riverside's biology department, report some exceptions, like the laysan albatross. Last year, researchers studying a Hawaiian colony of albatrosses found that nearly a third of all the couples involved two females who courted and then shared parenting responsibilities.... Male chinstrap penguins also form long-term relationships, at least in captivity. And some male bighorn sheep will mount females only after the females adopt male-like behaviors.
So what's the conclusion to the article?
There isn't one! No one knows anything for sure, other than a certain amount of this kind of thing seems to be entirely natural, if (obviously) exceptional.
And, of course, some animals are more gender-bender than others:
Bottlenose Dolphins are, apparently, "possibly the most bisexual animal on earth" and engage in frequent same-sex sexual activity. Roughly 50% of male dolphins have sex with other males. Scientists think this sex may help strengthen alliances among small groups.