I am not transgendered, so I cannot speak from experience on this topic. But I am a heterosexual crossdresser, so I feel I can write about that.
I think that heterosexual men in general have a strong sex drive, and that this begins early on. We seek outlets for this, and details don't need to be described here. However, I do think that certain things get wrapped up tightly within sexual exploration during puberty. Obviously, boys see girls and women and ponder them in various ways. Sometimes, the boy catches a glimpse of the "forbidden" or the "tantalizing" - a flash of leg or the inadvertent brushing by of a breast. Those kinds of accidents inform sexual expression, and may inspire behavior that becomes crossdressing. Crossdressing at this age and in the teen years is a convenient way to have a "women at the ready", whereby the boy is able to compartmentalize the behavior in a manner that retains the drive to be virile while also privately exploring sexuality through feminine things. These explorations eventually turn into habits, habits that can sometimes sexually satisfy certain men more than actual female companionship, which is interesting.
Clearly, in some cases, this crossdressing behavior reveals a truth about the boy, that perhaps he is really a female. I've no idea what that must be like, but I've heard that crossdressing can add form to feelings that trace back to infancy.
Anyway, I think crossdressing is quite common and exists in various forms. I have no science to back it up, but I would suspect that over half of all heterosexual men are crossdressers in some form or another. On the one hand, boys and men will feel shame, but only because they believe crossdressing will be perceived by others as an affront to virility. Other boys and men may discover that they are indeed female. I can't really speak to homosexual crossdressing, which apparently, but not exclusively, involves drag performances. I don't know anything about the history of drag performance, but I suspect that story often gets intermingled with the more private crossdressing behaviors, two things that get lumped together by the lay person. This doesn't usually go over well with heterosexual crossdressers, to be sure.
It's complicated, colorful, and fun. But I also recognize that it presents major difficulties in relationships and, it seems, in specific legal matters and civil rights. Hopefully, by the time I don a gray wig, things will have lightened up a bit around here and crossdressing will not be viewed as such an awful thing. Because, in the end, it hardly is.