Chinese call their ancient Chinese societies ‘societies of ceremonies’, because they were based on ceremonies or rituals, just as the Western societies are based on laws.
The Chinese term ‘li’ or ‘liyi’ (ceremony, rites or ritual) previously had the meaning of ‘sacrifice’. Its Confucian meaning ranges from politeness and propriety to the understanding of each person's correct place in society. Externally, ritual is used to distinguish between people; their usage allows people to know at all times who is the younger and who the elder, who is the guest and who is the host and so forth. Internally, rites indicate to people their duty amongst others and what to expect from them.
Ritual can be seen as a means to divide people into categories, and builds hierarchical relationships through protocols and ceremonies, assigning everyone a place in society and a proper form of behaviour.
Music, which seems to have played a significant role in Confucius' life, is given as an exception, as it transcends such boundaries and ‘unifies the hearts’.
Xunzi had said in essay ‘Yueji’ (Record of Music):
In music we have the expression of feelings which do not admit of any change; in ceremonies that of principles which do not admit of any alteration.
Music embraces what all equally share; ceremony distinguishes the things in which men differ. Hence the theory of music and ceremonies embraces the whole nature of man …
(The relation) between ruler and minister was determined from a consideration of heaven (conceived of as) honourable, and earth (conceived of as) mean. The positions of noble and mean were fixed with a reference to the heights and depths displayed by the surface (of the earth). The regularity with which movement and repose follow each other (in the course of nature) led to the consideration of affairs as small and great. The different quarters (of the heavens) are grouped together, and the things (of the earth) are distinguished by their separate characteristics; and this gave rise to (the conception of) natures and their attributes and functions. In heaven there are formed its visible signs, and earth produces its (endless variety of) things; and thus it was that ceremonies were framed after the distinction, between heaven and earth.