Without a divine ruler Who is taking care of society's oppressed and downtrodden, nations under duress become susceptible to extremist dysfunction. It is not just the upper classes who wish to oppress the lower classes, the lower classes as well can turn against even more disadvantaged members of their own society.
"South Africa's race society taught the mob the great lesson of which it had always had a confused premonition, that through sheer violence an underprivileged group could create a class lower than itself, that for this purpose it did not even need a revolution but could band together with groups of the ruling classes, and that foreign or backward peoples offered the best opportunities for such tactics." (The Origins of Totalitarianism, Hannah Arendt, 1994; page 206).
When a new Pharaoh rose up in ancient Egypt and enslaved the descendants of Joseph's family he was doing so with the willing co-operation of the oppressed populations of Egypt who wished for nothing more than to have another class of people – foreigners, Hebrews – occupy a social and economic stratum that was lower even than their own.
Joseph had disenfranchised the Egyptian people, and the Egyptian people, in turn, went on to enslave Joseph's descendants.