You mean there have always been people who believed they were or should have been the opposite sex, due to some cultural or subconscious personal symbolism or metaphor they associate with that sex.
It's very much the same as there have always been people who believe they can sense the dead or communicate with gods.
In some societies these beliefs are seen to be "real" and form part of the culture. In others they are seen as delusions or myths.
Transgenderism is no different, it's just our modern way of framing a very old thought pattern.
In reality, all three common beliefs are natural consequences of the way humans impose our own connections and meanings onto our environment.