Hammurabi code protected the weak with laws that made the strong more weak. Also hammurabi’s code influenced the creation of laws in a stable society. He ruled a small city state called babylon He ruled for 42 years making a large stone filled with laws.
He also made that people could live with rules.
Finally hammurabi’s code was just because it had fair punishments for the accused, also the victim had a refund and the society had a well contribution.
Hammurabi’s laws made all the society contribute to make a stable society, like for example in law 23 document D it clearly says “If the robber is not caught, the man who was been robbed shall formally declare whatever he has lost before a god, and the city and mayor in whose territory or district the robbery has been committed shall replace for him whatever he has lost” That law clearly says that it is just for the one that has been robbed and make the society pay. Also it’s just for the society that everybody does a part of the contribution of society so everybody is a citizen of the community.