If a particular gene causes good things 95% of the time (based on other interactions or developmental factors or whatever) and catastrophic failures like heart disease or cancer or crippling depression 5% of the time (and it represents a local maxima, with no simple improvements possible), then it can easily come to dominate a gene-pool, so long as the 95%-benefit outweighs the 5%-failure. It doesn't mean the 5% failure has been "selected for", it just means that it wasn't worth weeding out.
Moths circle lights because of genetic factors which influence their tiny moth brain's development. It doesn't mean that circling-lights was a selected feature.
You're betting evolution is not that good. One can also bet it better than you can possibly imagine. I don't think you can be sure either way at this point, but your argument seems to be the most compelling at this point!
Our genetic code doesn't include statements like "if (is_male) { try_to_have_sex_with_ladies(); } else { try_to_have_sex_with_dudes(); }".
Our genetic code produces proteins of different shapes and those shapes influence the development of the structure of our brains and their function and that brain generates feels of various kinds that lead to attractions of various kinds.
Evolution works by changing the coding of the genetic code which changes the shapes or amounts of proteins produced which changes the development... a local maximum happens when the final system produced (our feels of attraction) would be negatively affected by any individual mutation on the genetic code. There may be better feels-of-attraction systems you could build from scratch that would propagate the species better than ours, but you can't turn ours into this better system without making it worse for awhile.
Nature can't make arbitrary changes; it can only make incremental changes. And consequently, we frequently get stuck at local maximums rather than global maximums.
https://en.wikipedia.org/wiki/Group_selection#Good_of_the_sp...
I personally think the benefit of the community is definitely one of the factors. And I think the evolutionists have it wrong. But why does the public just accept whatever they say? It hardly sounds like a settled theory.
So, an extended family with a few homosexual kin might have greater reproductive success with their offspring having more caretakers.
In my opinion it must be to help the fitness of the community they live in. The communities with low likelihood to spawn a gay person are (were?) much more likely to go extinct. It can also be a basic property (side effect?) of the sexual appeal arms race.
There is also the case of suicides, when they happen to young people that hasn't reproduced yet. It can also be argued its for the benefit of the community.
So the thesis is that the primary force in evolution is not individual's fitness but it is the community's fitness.