The world behind and beyond the Bible is fascinating. Take the Code of Hammurabi, a set of over two hundred moral laws written on a stone stele in about 1772 BCE. Hammurabi was the sixth Babylonian king and, luckily for us, felt the need to inscribe his laws on something really durable.
According to the Wikipedia page on the code, it is one of the earliest known examples of a set of related laws used in that part of the world. An even earlier code, the Code of Ur-Nammu, contains prohibitions against murder, theft, kidnapping, adultery, and bearing false witness, among others. The Hammurabi code, meanwhile, introduces the concept of an “eye for an eye” (law 196) and a “tooth for a tooth” (law 200).
The Mosaic law, which includes the above-mentioned excerpts of older laws, appeared approximately five centuries after the Hammurabi code.
As the Bible itself says, there is nothing new under the sun!