sexual orientation is highly influenced by genetics and biology (such as what hormones you're exposed to in the womb). but it's not a yes/no or 1/0 type of thing. Let's give it a scale, say Kinsey-0 to Kinsey-6.
while a k-0 would find it very unrewarding to be in a same sex relationship, k-6s would find it very unrewarding to be in an opposite sex relationship.
but those in the middle, say k-2, 3 and 4, could go either way. They could spend part of their life living as a straight person, and part of their life living as a gay person. While their behavior changed, their underlying orientation did not.
While behavior is learned, orientation is not.
wrong but not on everything...
gay is determined by 2 things:
too many simultaneous existances as a woman "previously"
the soul personality decides then last moment xhanges it's mind on the which sex it'll be , male or female, right before entering the physical
So yes it's "genetic" in a way but not what you think.
Another thing :
our sould personalities are androgynous basically
so we all have these traits
I'd like to recommend " The True Nature Of Our Sexuality "
by Stewart Swerdlow for a detailed comprehensive insight
PS: my post above is intended for the intelligent getbig community