In an effort to increase the welfare of his people, King Hammurabi had a collection of 'laws' carved into stone columns which were located in public places. While it is true that many of these 'laws' were not written by Hammurabi himself, his idea of listing them publically and including a personal explanation of his reasoning for doing so proved beneficial to his reign. Hammurabi stated the importance that justice served in a society especially for the poor, for they were the most vulnerable according to Hammurabi.
The 'laws' extended over many aspects of society such as marriage, personal property issues, theft, personal injury, and even the adoption of children.
In addition, Hammurabi included a series of punishments and or reparations of sorts for violating these laws. He believed that accountability was essential in order for the 'greater good' of the society to prevail. When the people obeyed the law the gods showed the society favor, when people broke the laws the gods were angered and the society was threatened.