Keep in mind that to look for a cause of homosexuality is to presume that it's some sort of deviation from the default. That is, it assumes that everyone would be hetero were it not for some intervention, intentional or otherwise. This might appear obvious from an evolutionary perspective, since heterosexual activity directly promotes reproduction, whereas homosexual activity does not.
But this reasoning is flawed. Homosexuality is prevalent throughout the animal kingdom, especially in the higher mammals. This suggests that homosexuality is an important and fundamental part of the sexuality of social species. In other words, species with homosexuality must have a survival advantage over species that do not; otherwise it would not exist.
Consider how mammalian mothers behave toward their offspring: protective, caring, nurturing. This behavior is pervasive throughout the mammalian class. We don’t ask what causes this behavior. It seems obvious, because we think we can see the mechanism for its survival benefits.
Homosexuality is good for the species. Social species with homosexuality will have closer-knit and better-functioning societies, and they will, in the long run, out-reproduce (and force into extinction) species without it. If this were not true, then homosexuality would not be present, much less ubiquitous.