Milly, I wanted to back you up on your point about women's bodies rejecting male fetuses. First Born Boys May Increase Risk of Miscarriage
here is a link on a medical study in this area.
It is medical fact that the female fetus is the default and male fetuses are a mutation only of the female.
How does this explain homosexuality in men? When a woman's body tries to reject a male fetus, it produces antigens. If successful the fetus is miscarried, if unsuccessful the woman's body will produce more hormones in an attempt to stop the rejection.
The more male fetuses she carries, the more successful this process becomes, this can then lead to the male child being born homosexual.
Why would nature want homosexuals? because the female gene in the default, it tries to replicate itself as much as possible over the male gene. Homosexual males are more likely to provide more support to subsequent female children, because of their inherent feminine qualities, thus helping the female gene to survive. Gay men are predisposed to helping raise children.
Homosexuality is predominant throughout the animal kingdom, it is not exclusive to humans.
I don't really see apes or dolphins thinking "hmmm, I think I might like to be gay, just for the rampant sex"
See also: Born Gay? - TIME
The real bottom line here is, honestly, what does it matter?