This is a little like saying "why do so many animals fall in love"? Homosexuality, like love, is a human abstraction and doesn't really apply to the broader animal kingdom. Animals are acting more on instinct than we are, and when they pair up it's due to a survivalist instinct rather than a complicated social construct. So the answer is, there are no "gay" animals just like animals don't "fall in love". We are simply projecting our highly abstract concepts onto them.