John Rawls offers an interesting thought along the way in his development of the theory of justice, on the question of the stability of a well-ordered society. Basically, the idea is that a set of principles of justice need to satisfy a condition of publicity and social stability: the principles need to be such that, when everyone knows that these are the principles that regulate their social interactions and know that all others have the same knowledge, the society remains stable.
Rawls puts the point this way:
Now a well-ordered society is also regulated by its public conception of justice. This fact implies that its members have a strong and normally effective desire to act as the principles of justice require. Since a well-ordered society endures over time, its conception of justice is presumably stable: that is, when institutions are just (as defined by this conception), those taking part in these arrangements acquire the corresponding sense of justice and desire to do their part in maintaining them. One conception of justice is more stable than another if the sense of justice that it tends to generate is stronger and more likely to override disruptive inclinations and if the institutions it allows foster weaker impulses and temptations to act unjustly. The stability of a conception depends upon a balance of motives: the sense of justice that it cultivates and the aims that it encourages must normally win out against propensities toward injustice. (A Theory of Justice, pp. 454-455)
What is interesting here is that Rawls is engaging in a bit of sociological theorizing in this passage — not simply apriori moral philosophy. He is offering an analysis of the social psychology and motivations of people living within various frameworks of justice — the principles governing the basic institutions and laws of a society — and he hypothesizes that the social psychology of citizens is influenced by the features of justice that are embodied in their society. The resulting social psychology in turn produces behavior that is more or less compatible with the continued stability of the institutions and laws. A given set of institutions, generated by a certain theory of justice, gives rise to motivations on the part of citizens in ordinary life; and these motivations can be either stabilizing or destabilizing to the postulated institutions and framework of justice. There is a feedback loop from institutions to social psychology to behavior to basic institutions.
This raises an interesting question: how much of a role does a shared sense of justice play in sustaining a peaceful and stable society?
One piece of the answer is straightforward: injustice is a common cause of societal conflict and violence. Basic social relations that are perceived to involve unfair exploitation of one group by another are an obvious source of motivation towards resistance and group violence. Contrastively, institutions that are publicly recognized to treat all citizens fairly may promote a social psychology and a set of behaviors that are affirming of the institutions — leading to harmonious social life and stable institutions.