Complex societies needed repetitive rituals in order to get off the ground. Routinizing rituals makes deviations from the standard script easy to detect. And this means that when people step out of line, they can be sanctioned.