I believe the answer is: morality
The purpose of morality is to act as some sort of guidance to perform correct behavior that all 'rational' persons should do within a social group. Morality does not necessarily regulated by law, but violating it would definitely make a member of a social group the be negatively perceived by other members.