This is a really good question.
From a Darwinian perspective, there needs to be some purpose to gay children being born to straight parents, or it wouldn't keep happening, generation after generation, throughout time.
So what's going on?
I'm reading a really old book, "Intermediate Types Among Primitive Folk: A Study In Social Evolution" by Edward Carpenter (published in 1921) and in it (pgs 57-58) he addresses this exact question. I thought his answer was pretty fascinating, so here it is:
In the primitive societies the men (the quite normal men) are the warriors and hunters. These are their exclusive occupations. The women (the normal women) attend to domestic work and agriculture, and their days are consumed in those labors. But in the evolution of society there are many more functions to be represented than those simple ones just mentioned. And we may almost think that if it had not been for the emergence of intermediate types - the more or less feminine man and similarly the more or less masculine woman - social life might never have advanced beyond these primitive phases. But when the man came along who did not want to fight - who perhaps was more inclined to run away - and who did not particularly care about hunting, he necessarily discovered some other interest and occupation - composing songs or observing the qualities of herbs or the procession of the stars. Similarly with the woman who did not care about house-work and child-rearing. The non-warlike men and the non-domestic women, in short, sought new outlets for their energies. They sought different occupations from those of the quite ordinary man and woman - as in fact they do to-day; and so they became the initiators of new activities. They became students of life and nature, inventors and teachers of arts and crafts, or wizards (as they would be considered) and sorcerers; they became diviners and seers, or revealers of the gods and religion; they became medicine-men and healers, prophets and prophetesses; and so ultimately laid the foundation of the priesthood, and of science, literature and art. Thus - on this view, and as might not unreasonably be expected - it was primarily a variation in the intimate sex-nature of the human being which led to these important differentiations in his social life and external activities.
Wow. Heady stuff, isn't it? Gay people are the reason humanity isn't still in the stone age!
Enjoy thinking about that one.... I know I will!
ps- The image above is my attempt at the Darwinian evolution fish with a gay rainbow flag inside. If you can't find it, make it yourself, right?