Xunzi also does not feel that we should just promote altruism (generosity) towards others, because people cannot be trusted without some discipline.
In Xunzi’s philosophy, li means proper behavior, and it is necessary for social harmony, and it regulates their behavior.
This meaning of li is slightly different than with Confucius and Mencius.
To Confucius, li (proper behavior) should be combined with ren (human feeling). Mencius combined these two principles with human moral goodness as well.
But to Xunzi li is more about being obedient to the laws of society (hence proper behavior).