I'm not under the impression that any of what follows is some kind of revolution in thought. It's just useful to lay things out every once in a while. Suggestions for amendments also welcome.
At the start, people for the most part do what is needed for survival (obtaining and preparing food, finding and/or constructing shelter) themselves, individually or cooperatively as a community.
A point arrives where some minority, whether through luck or nasty genius or both, hits upon a way of getting other people to do these things for them--that is, a method of getting other people to use some of their time to provide necessities for them rather than for themselves and their actual community. This is great for the minority.
It does however create a problem in that such a system is naturally subject to a lot of resistance from the majority, who would rather use their time and labor for themselves and their communities than for a minority of people who don't do anything to help. The minority therefore have to devise methods to keep the majority working for them, whether through violent enforcement or the establishment of a system of beliefs, religious or otherwise, or the corruption of a pre-existing system, which will function to convince the majority to sacrifice portions of their own lives for the benefit of the minority.
The minority is no happier doing this work than they were doing the work of directly supporting their own lives, especially since by this point they've gotten used to not doing any work. So for their own convenience they create a new class, still a minority but a larger one than the now-ruling class, which will be responsible for managing the people who do the essential work: keeping up the belief system, performing violent enforcement, etc., in the service of keeping the necessities flowing from the class that still creates them.
Perhaps at first this intermediary class still spends some time producing necessities as well, but as their responsibilities grow more complex, this becomes increasingly impossible. So before long, there is a laboring majority, which does all of the actually necessary work, a ruling minority, which does none of the actual work itself, and a third group, intermediate in both size and power, which does all the work of keeping this situation viable but none of the genuinely essential work (in case it needs to be said, I and in all likelihood you are members of this class).
Of course, there is then a problem with keeping the intermediate group doing its job instead of rebelling, as it otherwise would tend to and indeed on occasion does. And so another intermediate class must be created. And so on, until, inevitably, the whole damn mess collapses, one way or another.
This pattern is observable on many different scales, from worldwide to a specific empire to a specific region to a specific town to a specific family.