Ma'at, the Divine Order, was an ideal world established at creation, summarized as "right order" and personified by a female goddess.
Ma'at was in control of differences, rather than their elimination.
On a cosmic order, creation itself was seen as order amidst chaos. Pharaohs had the responsibility of maintaining this order and keeping enemies at bay.
Humans were seen as being the primary reason for unrest in the world... "Because their hearts break". For Egyptians, the "need to act in accordance with Ma'at" came out of a practical realization, that any other action would result in disorder. So historians believe this is the main reason ancient Egypt never developed a codified system of either civil law, or religious commandments.