It varies. In some instances, it's brought on by addiction to porn and a constant need to graduate to more and more taboo material to satisfy cravings. For others, it comes from repressed homosexual thought/feelings couples with homophobia or deep-seated shame as an alternative to straight up gay porn. This is why you see people constantly squabbling over dumb, irrelevant shit like, "Is it gay to let a trap suck your dick?". Most people who are accepting of themselves/gay shit realize that it doesn't matter.
For me, I'm a pretty well-adjusted, sexually active guy. I'm bisexual, but have had girlfriends for most of the past 4 or 5 years and can have sex whenever I want. The appeal for me is just that I love cocks and beautiful girls.
I think people that fit into one of the three groups I've described, plus the increased acceptance/prevalence of being gay/bi/trans has led to an uptick in the visibility of trans people, and therefore a demand for porn featuring them.