To begin with, Hammurabi’s code was just because it helped the family be together. For instance, in Law 129 it says if a married lady is caught in adultery, they shall both be bind and cast into water. Also, in Law 195 it says that if a son has struck his father, his hands shall be cut off. Based on what I read, Law 129 helped the lady and the man be together. On Law 125 it shows that it helped children be obedient. As you can see, these Laws helped the family be together by being obedient.
Afterwards, Hammurabi’s Code restored loss property. For