It wasn't really treated as a mental disorder since the famous sexologist, Magnus Hirschfeld, coined the "transsexual" in the '20s, started the process of scientifically differentiating between gays, transvestites and transsexuals and began helping trans people to medically (hormonally/surgically) transition in the '20s and '30s. Another doctor, Harry Benjamin, in the '50s, also helped in that area.
Biology doesn't agree with you when it comes to chromosomes and physical sex. Being intersex, for example, isn't really seen as a "birth defect" anymore, and that's for the better since it's now becoming more and more disdained to forcefully assign a sex to an infant or child when their genitals are "ambiguous" at birth. Now it's becoming more standard to leave the child alone and let them develop their own identity and make their own choices about their bodies in their lives. Many intersex people have had their lives ruined because they were forcefully surgically assigned a sex in their childhood that they didn't end up identifying with because doctors wanted to "normalize" them. There's many intersex people who are quite happy being "inbetween" and take pride in that, because that's really how nature created them.
Biologically speaking, physical sex, along with psychological sex, is a spectrum. There is no binary, even in terms of pure biology and physiology. What makes up a person's sex is a very complex interplay between chromosomes, hormones, the uterine environment, the effects of those things on brain development, etc. The best guess that science has for how people end up being transsexuals is that the brain of the child in the womb is flooded with the hormones that are "opposite" of their chromosomnal sex and it causes our brains to masculize or feminize in opposition to our primary sex characteristics. There's brain studies of transsexuals, even before cross-sex hormonal therapy, that shows that our brains are more alike the sex we identity as, rather than our genital sex. At the very least, our brain structures lay in an inbetween category.
One proof of this is digit ratio. For some reason, the index and ring fingers are effected by the level of androgens in the uterine environment. Males tend to have a longer ring finger than females do, and females tend to have ring and index fingers which are about equal in length. We're not such why it happens, but it does. Anyway, transsexual women tend to have a female digit ratio (which means that their brains were exposed to less androgens in utero than a typical natal male) and transsexual men tend to have a male digit ratio (which means that our brains were exposed to more androgens in utero than a typical natal female). (I have a male digit ratio, by the way.)
So there's a spectrum of sex and gender, in reality. There's much, much grey in this area.
When it comes to psychiatry, it's not an exact science. Both psychology and psychiatry have a nasty habit of being unduly influenced by the social mores of the day. We can see that in the many disgusting abuses of those were struggling with mental health issues or were just "too different" to be acceptable by society, since the advent of those fields of study. Psychosurgery (most notably, lobotomy, which has destroyed thousands of lives and even killed people), the inhumane and torturous conditions of "lunatic" asylums and even some modern psychiatric hospitals, electroshock, aversion therapy, "reparative therapy", etc. You could even have your spinster, free-spirited aunt taken away by the men in white and locked up in a loony bin if you found her too socially "embarrassing" to your tastes, for quite a while before there were reforms due to activism on the behalf of those victimized by such a system. So psychiatry is not infallible. Thankfully, today's psychiatry tends to be much more humane and grounded in actual science than in decades past. They are moving forward.
Now, as for religion, it does matter here, unfortunately. The truth of the matter is that this disdain, disgust and outright hatred towards LGBT people and other groups does largely stem from Abrahamic religious mores, with its rather harsh binary view of reality. Despite what you seem to think, gender variance is nothing new. It is not some liberal government conspiracy to destroy the family or whatever. Most cultures in the world have had social space for people who are not clearly - in terms of a binary - designated, identify as or live as men/male or women/female. So you have concepts of third gender people and some cultures even had concepts of 4, 5 or more genders. Gender variant people tended to be viewed as gifted and blessed by the spirits and deities of those cultures. Being able to transverse boundaries of gender was seen as a great and powerful gift granted to spiritually advanced souls, who were more balanced and in tune with both their feminine and masculine aspects. They tended to perform important religious functions, functioning as priests and priestesses of revered deities. They were shamans, healers and oracles. Sometimes they were even kings, queens and emperors. There are even many Gods and Goddesses who are gender variant, switch genders, are androgynous, etc. and so gender non-conforming people could see themselves reflected in the Divine.
But Abrahamic religions had a different view of things. (Zoroastrianism, Gnosticism and some other religious currents have their share of the blame, too.) No more inbetweens, no more grey area. Everything's binary, everything black and white. God/creation, good/evil, God/Satan, pure/sinful, male/female, sacred/mundane, Heaven/Hell, salvation/damnation, etc. This is not how things were viewed for the majority of human history and in the majority of human societies. It is not an organic view of things. It had to be forced on most of the world that has been converted to it and, even then, it hasn't been able to completely wipe out the older, organic way of viewing the world.
So what we have here is really a return to normalcy in this area, when it comes to greater recognition of diversity in gender/sex and sexual orientation. The strict binary view is the abnormal, the aberration and the anomaly. The view of the matter as a rainbow or spectrum is much older than when some obscure Canaanite tribemen started hearing Yahweh dictating to them.
No, most trans people are just fine when we're treated respectfully, are afforded the same rights, protections and opportunities of the majority and we have access to appropriate health care. We're only a tragic people when hateful people force us into that role.
So now that a trans person presents their perspective, you want to cut and run? Figures.
FYI, I haven't had any surgeries. I'm just on testosterone therapy. I have no real desire for genital surgery as I actually enjoy my genitals, wish to have children someday and don't think that makes me "less" of a man (how scary and strange!
). I would like to have chest reconstruction surgery eventually, but I'm in no rush.