RE: by evolution or creator take your pick)
If it is by evolution, then anything goes.
Things evolve for a reason ..or really random anomalies be come part of the permanence design if is give an advantage the organism to reproduce itself and its anomaly over and over.
By itself gay seem to be a self destruct / kill switch for an organism to prevent its reproduction... at best sterile worker bees..