I can only add my thoughts on the subject from an outside perspective because I am not trans myself. But I’ve met and spoken to trans people over the years and asked them questions like these because it is a rather unique experience.
I think, as with most things involving identity, there’s a lot of nuance to it. Some people may go through body dysphoria, identity crisis, self-rejection, or imposter syndrome and initially believe transitioning is the solution, only to later realize that it wasn’t right for them. Others experience something much more persistent and deeply rooted from a very early age.
You also have people who are simply naturally more masculine or feminine without being transgender. A girl may naturally prefer boyish clothes, sports, playfighting, and other masculine things and grow into a masculine woman/butch lesbian. But even then, masculinity and sexuality aren’t the same thing. A masculine woman can be straight, and a very feminine man can still be attracted to women.
Then you have people where it seems to go deeper than expression. It isn’t simply “I’m a masculine woman” or “I’m a feminine man,” but a deeper feeling that their body or the sex they are perceived as doesn’t correspond with how they experience themselves internally. In those cases, transitioning can feel like the way to resolve that disconnect.
The roll of the dice in becoming human can be very random. Most people fall somewhere around the typical pattern of males being more masculine and females being more feminine, but humanity produces all kinds of combinations. You can have feminine straight men, masculine gay men, feminine gay men, masculine lesbians, and people whose gender identity itself doesn’t align with their body.
From an energetic perspective, I tend to think of humanity as an alchemical concoction of masculine and feminine energies.
Most people seem to have a balance that corresponds closely enough with their physical sex that they never question it. Sometimes you get a male with a very strong feminine nature who is still perfectly comfortable being male. Sometimes you get a masculine woman who is perfectly comfortable being female. And perhaps in more extreme cases, that inner configuration differs so strongly from the body that it creates a profound sense of disconnect.
I personally interpret transgender people as one of the stranger variations that can happen when consciousness, personality, sexuality, body, and masculine/feminine qualities combine.
I also don’t think every transgender person necessarily arrived there through the exact same way. Some of it may be biological or developmental, some may involve very early psychological imprints, and some of it may involve things we simply don’t understand yet.
I believe consciousness is much more malleable than we currently understand, so I leave open the possibility that very deeply rooted patterns could be reprogrammed. But… it is unfortunately extremely rare or just extremely difficult to do. Modern psychology has not discovered a reliable way to simply reprogram someone’s sexual orientation or gender identity, and religion often only succeeds in making people suppress how they feel rather than actually removing the feeling.
For some people, questioning themselves may eventually lead them back toward accepting their biological sex. For others, the disconnect seems so persistent that transitioning ends up being the path through which they feel most at peace.
So I don’t think there is one clean explanation. Humanity simply produces a huge spectrum of bodies, personalities, sexualities, identities, and different configurations of masculine and feminine energy. Transgender people may simply represent one particularly strong form of that variation.