A social order is an imagined order. Humans imagine that people have rights and are part of social classes. And so there has been a wide variety of social orders throughout history. To see this, you can compare the Code of Hammurabi, a Babylonian law from 1750 BC, with the United States Declaration of Independence from 1776 AD.
The Code of Hammurabi declares that the Babylonian social order is based on universal and eternal principles of justice dictated by the gods. It divides people into three classes, nobility, ordinary people and slaves. The code then sets out all kinds of laws and punishments for transgressions. The United States Declaration of Independence begins with the following sentence:
“We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable rights, that among these are life, liberty, and the pursuit of happiness.”
On closer inspection 3,500 years didn’t make a lot of difference. The eternal principles are replaced by self-evident truths and the order still needed some divine support. There is no mentioning of classes in the United States Declaration of Independence, but the devil is in the details. Women and slaves were not created equal and did not have these unalienable rights when the constitution was written. Only nobility was done away with because businesspeople had become the new ruling class. In the 200 years that followed slavery was abolished and women received equal rights before the law.
If people agree on a social order, whether it is a division in classes or the notion that everyone is created equal and has some unalienable rights, it can be a stable order. Saying that people are equal and have rights is problematic. People are not equal in their abilities as well as their opportunities. Things like equality and rights only exist in the collective imagination of humans. For example, we can imagine the right to live but we all die. Some people die young and some live very long. Yet we imagine that people are equal and have rights like the Babylonians imagined that people are divided into classes. Humans imagine social orders to enable cooperation on a large scale in societies.
See also: Sapiens: A Brief History Of Humankind. Yuval Noah Harari (2014). Harvil Secker.