I don’t know.
I have known most of my gay friends pretty well for a very long time.
I don’t think their gender preference (and it is a preference) is the result of anything except preference.
Some human leanings are physiological and some are the result of earlier stimuli and others are effectively idiosyncratic (or idiopathic depending on your perspective).
Trying to boil this down as an A leads to B behavior strikes me as silly.