The need to control, regulate, and legislate ethical conduct on the individual, corporate, and government levels has ancient roots. For example, one of the first law codes developed, the Code of Hammurabi, made bribery a crime in Babylon during the eighteenth century b.c. Most societies share certain features in their ethical codes, such as forbidding murder, bodily injury, and attacks on personal honor and reputation. In modern societies, the systems of law and public justice are closely related to ethics in that they determine and enforce definite rights and duties. They also attempt to repress and punish deviations from these standards.
Laws can be neutral on ethical issues, or they can be used to endorse ethics.
The prologue to the U.S. Constitution says that ensuring domestic tranquility is an objective of government, which is an ethically neutral statement. Civil rights laws, on the other hand, promote an ethical as well as legal commitment. Laws also permit many actions that will not bear ethical scrutiny. In other words, what the law permits or requires is not necessarily what is ethically right. For instance, laws allow disloyalty toward friends, the breaking of promises that do not have the stature of legal contracts, and a variety of deceptions.