Women rape men fairly rarely, and even a woman who raped thousands of men generally cannot have more than a dozen offspring as a result. By contrast, one in every 200 men today has Genghis Khan's Y chromosome: https://en.wikipedia.org/wiki/Descent_from_Genghis_Khan
This should go without saying, but I'll say it anyway: the fact that rape can produce offspring does not make rape morally commendable or tolerable.
It's true that the stubborn existence of gay people poses challenges to any kind of simple ev-psych explanation of human sexuality, and it's tempting to conclude that although sexual behavior in sheep and partridges is instinctual, sexual behavior in humans is purely culturally constructed, because humans are rational beings not controlled by instinct, and this is why some humans are gay. This explanation runs into several big problems:
1. Lots of sheep and partridges are also homosexual. Also several hundred other species at least.
2. If you have ever met a human, you know they are not very rational, and cultural conditioning is in a constant pitched battle with human instincts.
3. For decades in the US the standard treatment of male babies born with deformed genitalia was to perform sex-reassignment surgery on them and raise them as girls. If human sexual behavior were purely culturally constructed, then as adults about 90% of them would have sought male partners, like 90% of other children raised as girls. Instead, most of them sought female partners.
4. Homosexuality seems to be a cultural universal.
So, the evidence in favor of the "born this way" hypothesis is pretty overwhelming, especially for men. So, how did "gay genes" not get wiped out?
Among the numerous theories mentioned in the WP article: "There was genetic material being passed down on the X chromosome which both promotes fertility in the mother and homosexuality in her male offspring." (Camperio-Ciani, Corna, and Capiluppi 2004) Another possibility is that being gay is biological and congenital, just not genetic, for example due to fetal hormone exposure or immune response by the mother's body.
Historically, lots of gay men have been voluntarily married to women, had sex with them, and had children with them. This still happens today. I have known gay men who have never had sex with women, but they are very much the exception to the rule. (There are men who are exclusively attracted to postmenopausal women, too, just not very many of them.)