It seems to be a matter of how much testosterone you were exposed to in the womb.
But other things have included an epigenetic theory.
Imagine a 100% heterosexual man and 100% heterosexual woman were to have a baby (that happens often enough). The conception of the baby would normally have the epigenetic from its same-sex parent. Imagine the particular epigenetic is like a sticky note, which on straight men and lesbians, says "Yeah, men aren't your jam at all, but women are goddesses!", and on straight women and gay men, says "Yeah, you definitely want to have sex with dudes ohhh but not chicks though. No way.". The idea is you would instead, get it from your opposite-sex parent.
In terms of bisexuals and asexuals, we probably got a fusion of sticky notes that would either turn out to be, "You should like girls. Heck, guys are a load of fun too so why not?" or for asexuals, "You're not gonna wanna be sexy with nobody, muh dude."
So genetic? Pretty likely. Disorder? No way.