I have a few ideas, some more likely than others.
When thinking about consciousness, I use a model where the reality that we perceive is a simulation produced by the brain, whose job it is to take sensory data and use that to modulate the simulation. In our case, that is mostly through the use of eyesight, but any sense can be used to produce our mental model of reality. For instance, bats use echolocation to see the world and so might perceive their environments as a 3D world much like we use vision.
So, when we take psychedelics, my intuition is that we are modulating the way the brain operates, such that it produces a slightly altered simulation of reality. On DMT, the function of the brain is changed so much that the mode of operation completely shifts, producing an entirely different simulation of a different reality. The mode of operation is defined here as the connections between neurons and how they are firing, as well as the source(s) of sensory data.
The question then becomes, where does this alternate mode of operation come from? Is the brain perceiving a very real alternate reality that isn't normally accessible, or is the DMT state purely a manufacture of the brain. It's very tempting to think of the DMT state as a freestanding reality because that is how it seems, but I tend to think of the brain as unreliable in that respect and so I remain skeptical. In addition, there isn't any known physical explanation for such a phenomenon so I consider it to be unlikely.
Though, I did have one experience where I met some DMT aliens and they were trying to tell me the true nature of their reality. They showed me a picture of our galaxy, showing how it is embedded in dark matter, and said that their reality is one of dark matter (which is around and through and in us at all times but non-interacting). They said that when you take DMT, it provides a way for consciousness to bridge from one reality to another. It seems unlikely to me, but could be a physical explanation for the DMT experience.
If the DMT experience is purely a product of the brain (which it most likely is), it then begs the question, what drove evolution to build this very unusual reaction to DMT into our brains? Most psychedelics simply modulate sensory data, altering our perceptions of normal reality. However, DMT seems of a different character, and seeing as it is the only endogenous psychedelic (as far as I am aware), I would wager that the DMT experience has evolved with us and is not some sort of physiological noise.
The DMT experience doesn't seem to have much immediate value for survival, and so it is hard to say how such a brain state could have evolved. It would be very interesting to see how far back in the evolutionary tree animals were affected by DMT by testing close relatives (apes, primates, mammals, etc), so that we could maybe pinpoint a time when the experience evolved. If apes are affected by DMT in a similar way to humans (though that's hard to test), then the DMT brain state is probably much older than sentient thought. That would be very strange indeed.
Hopefully we'll know some day.