After its reformulation as Neo-Confucianism by Zhu Xi and the other Neo-Confucians, Confucianism also became accepted as state philosophies in Korea and Japan.
Lead the people with administrative injunctions and put them in their place with penal law, and they will avoid punishments but will be without a sense of shame. Lead them with excellence and put them in their place through roles and ritual practices, and in addition to developing a sense of shame, they will order themselves harmoniously. (Analects II, 3)
The above explains an essential difference between legalism and ritualism and points to a key difference between Western and Eastern societies. Confucius argues that under law, external authorities administer punishments after illegal actions, so people generally behave well without understanding reasons why they should; whereas with ritual, patterns of behaviour are internalised and exert their influence before actions are taken, so people behave properly because they fear shame and want to avoid losing face.