Population control is not really a built-in feature of human evolution, or any species really. Population control usually comes in the form of an externality like the tragedy of the commons.
In the womb we are all female by default until complex genetic-mediated hormonal processes make us switch from female to male. The best explanation I have read so far for homosexuality is that with each successive male pregnancy, a woman may develop antibodies to the newly forming androgens which help shape male neurology. It's already known that a disproportionate number of gay men have more male siblings.
In more ancient terms, it would mean that such a child would be less likely to reproduce as an adult, thus being less weighed down by the responsibility of raising a child and more able to offer auxiliary support to their family / community. For this reason, we cannot assume that the process is a result of a defect. It probably has a very useful purpose. Gay men have differing abilities than straight men, statistically. Their linguistic and spatial orientation skills are usually superior.
Unfortunately, this theory doesn't fit 100% because our knowledge of the ancient world also tells us that sexuality was a lot more fluid. Men often had sexual encounters yet still formed pair-bonds with women for reproduction. In ancient Greece it was common for an older man to school a younger man in sexuality (the ancient form of pederasty), while also teaching him to honor the traditional obligation of pro-creation.
At this point I feel that 'gay' is an identity that becomes hardwired with time, combined with a predisposition, but is not necessarily a biological trait... which is why, so far, a gene for it has not been found. I think that, without being raised in an environment with so much identity politics, humans are just sexual opportunists.