https://www.theguardian.com/science/2008/jun/16/neuroscience.psychology
While I don't believe that genetic causes are the only reason that people engage in homosexual activity, this may provide a genetic explanation for why some people have a specific preference for the same sex, or why some people identify as transgender, despite it not having any apparent evolutionary purpose (obviously, most people will be hardwired to seek out members of the opposite sex for biological reasons).