I've been pondering this question for a long time, and I think I've developed a reasonable hypothesis.
Assumption: All aspects of human behaviour are the result of evolutionary process, including social conventions, abstract concepts, and social structures. Nature doesn't keep things around unless they are somehow useful in an evolutionary framework.
Hypothesis: Gays (inclusive) are socially advantageous because they supply a small population of adults who are typically unencumbered by the work of child rearing. At times there are sudden increases to the necessary workload of a social group due to environmental pressures. If all adults were encumbered by child rearing then there would be no additional people to deal with these periodic increases to necessary work without sacrificing the well being of children.
During times of normal activity levels, the population of unencumbered adults are freer to pursue optional activities which advance technology, liberal arts, and other fields of endeavour which are not strictly required for survival and species propagation.