It wouldn't even have to be useful in an evolutionary sense. Perhaps one of the benefits of intelligence (if you can call it that) was the development of social pressures to keep people with homosexual tendencies reproducing. They may have always snuck stuff on the side, but still had their wives and husbands and kids.
The development of a sexually open and free society is really just within the past generation or so. In any case, legion, still, are the homosexuals who come out of the closet later in life, even to themselves, having already reproduced.
E.g. Ted Haggard, Larry Craig, et al.
I think presuming there must have been a valid (i.e. evolutionary) reason for homosexuality to develop may be missing the bigger picture that, for all human history but the very recent, they were functionally heterosexual "enough". The organism may have been gay, but the slightly larger organism that is gay biology + social pressure, functionally was not. Evolution doesn't care why you reproduce, only that you do. Gay biology (for no reason, or genetic drift, or god knows what) + social pressure is just fine with it.
Discussions about this are, unfortunately, hopelessly entangled with the politics, that, wrongly IMO, seems to demand people be "born this way" in order to justify their actions. That is technically irrelevant. In a properly defined society, The People never grant the government the authority to regulate adult sexuality. Hence questions like these are of purely academic interest.