I'm pretty sick of having to type out this explantion when people could just google gay and evolution, as people who work in evolutionary biology have explained so many times why homosexuality is an important adaptive strategy for the survival of the species.
I will type it out anyway as Lenin is having such a hard time.
An evolutionary adaptive strategy is measured in terms of inclusive fitness. That is, whether or not an individual's genes can be reproduced in the next generation in an individual who themselves reaches adulthood and is capable of reproducing.
Example: Two straight sisters marry two straight brothers. Each couple has 2 children and so 4 adults are supporting 4 children. A situation of scarcity happens (as it so often did in the human past) and the 4 adults expend more energy (walking further to gather etc) to gain less food. They cannot support get enough energy (food) to feed the four children and the children die. No genes survive to adulthood.
Example 2: One straight sister marries a straight man and the other sister marries the man's sister. The straight couple has 2 children which are raised by both couples. In a time of scarcity, 4 adults can gather enough food to feed 6 people, and the children survive. As the children are nieces of the gay sisters, each gay sister is passing on 25% of her genes to each child.
There are lots of more nuanced ways of this working - people who are gay most of the time but have sex for reproductive reasons would have an excellent strategy because they wouldn't get pregnant accidently and could space births to ensure resources were available for each child to survive. The average birth spacing in a 'natural' group of humans is 4 years, and this has to be explained by not having heterosexual sex for most of the time as the period where pregnancy is impossible because of extensive breastfeeding is only about 10 months on average.
Where homosexuality is banned, people find ways of enforcing chastity - priests, nuns, situations where second sons have to leave the tribe, or all younger sisters are not allowed to marry and must help the older one raise her children. Homosexuality is nature's way of reducing clutch sizes. If every woman went around having sex with a husband all the time, it is hard to see in the past how children would have been fed.