There are congenital factors for homosexuality as well. The more babies a woman has, the more estrogen is present in the womb due to an immune response, increasing the chances of homosexuality. This explains why younger siblings have an increased likelihood of being gay, and why older brothers tend to look more masculine. With twins, it's often said that there's a dominant one and a submissive one. Twins will fight in the womb and sometimes even try to cannibalize each other. Maybe the submissive one has a higher chance of being gay? Just a thought.
Obviously, sexuality is complex and relates to a number of factors. The causes of homosexuality are worth exploring purely for curiosity, and have no bearing on whether or not it is moral.