Steve I have put together a few cut and pastes that might help you with your question about OT law and its similarity to neighboring cultures. I too have asked the same questions. FYI all of this information is available from The Lexham Bible Dictionary. .
_The Law in the Ancient World_
Examples exist of law codes from various ancient societies, including:
• Ur-Namma (ca. 2100 BC)
• Lipit-Ishtar (ca. 1900 BC)
• Eshnunna (ca. 1770 BC)
• Hammurabi (1750 BC)
• Middle Assyrian Laws (ca. 1400 BC)
• Neo-Babylonian (ca. 700 BC)
• Hittite (1600–1200 BC)
• The covenant and Deuteronomistic law codes in Hebrew Bible (post 14th century BC)
The Canaanites in the Levant did not have their own legal code, but instead relied on Babylonian forms (Mendenhall, Law and Covenant, 13).
Israel reflected other societies of the ancient Near East in its belief in divine rule. However, Israel was unique in that its legislation came from its deity, Yahweh, whereas elsewhere “the king was the primary source of legislation” (Westbrook, “Character,” 26). Israel’s divinely-imparted law code regulated religious activity as well as peripheral elements like diet, warfare, and national and ethnic identity.
Biblical property, family, and civil laws contain multiple ancient Near Eastern parallels. For example, George Mendenhall described a second-millennium Hittite suzerain-vassal treaty whose form reflects the literary structure of Deuteronomy (Mendenhall, Law and Covenant, 24–48). Albrecht Alt identified two forms of law in the Hebrew tradition (Alt, “Origins,” 81–132):
1. apodictic or unconditional law, which was rooted in the will of Yahweh and was unique to Israel
2. casuistic or case law, which was part of the broader ancient Near Eastern legal convention
However, Israelite legal tradition also contains significant variations from its neighbors. For instance, the Old Testament lacks laws governing adoption, which were common in the region. Similarly, many ancient law codes call for various forms of mutilation as penalties. This type of penalty appears in the Old Testament only once in a safeguard of progeny (Deut 25:11–12).
These texts provide a shared cultural backdrop for Old Testament law and highlight the unique aspects of biblical law.
• Middle Assyrian Laws (ca. 1100 BC)—Laws composed in the cuneiform writing system of ancient Mesopotamia. The documents were written in the Middle Assyrian dialect of Akkadian. The existing copies were apparently edited during the reign of the Assyrian king Tiglath-pileser I (ca. 1115–1077 BC).
• Code of Hammurabi (ca. 1700 BC)—Attributed to King Hammurabi of Babylonia and carved onto a stela made of diorite. About half of the code deals with contracts, establishing wages, transaction terms, and liability. About a third of the code addresses household and family issues like inheritance, divorce, and sexual behavior.
• Laws of Eshnunna (ca. 1800 BC)—Contains the first exact parallel to any early biblical law. This parallel concerns the division of oxen after a fatal combat between animals (Exod 21:35). This law code is highly structured, with a “If A then B” pattern. The code breaks down into five subcategories (Yaron, The Laws of Eshnunna):
• Theft and related offenses
• False distress
• Sexual offenses
• Bodily injuries
• Damages caused by a goring ox and comparable cases
The Old Testament law is similar in subject matter and formulation to the laws of its historical and cultural neighbors because Israel lived in a similar cultural, political, and economic context. For example:
• HL 17, the Sumerian Laws 1–2, LH 209–214, MAL A 21, 50–52, and Exod 21:22–25 all discuss cases of striking pregnant women and causing a miscarriage.
• Laws on slaves and goring oxen are common to both.
• Several ancient Near Eastern laws agree with Biblical law condemning murder, adultery, and incest (LH 1, 129, 157).
The orientation of law toward practical problems is common to both the Bible and the laws of their surrounding culture. As both groups experienced common crises, they understandably share common laws for dealing with those situations. Examples of similarity between biblical law and the laws of the ancient Near East include:
• Exodus 21:24 matches sections 196, 197, and 200 of the Hammurabi code.
• Both Exod 21:28–36 and the Eshnunna code contain similar material about an ox that gores.
• Deuteronomy 22:23–27 and the Hittite code (section 197) are similar in their laws regarding rape.
_While there are similarities between the laws of the ancient Near East and biblical laws, there are also key differences. For example, in the Torah an ox goring a slave differs from an ox goring an ox (Exod 21:28–31; 35–36). In other ancient Near Eastern law codes (LE 53–55), both oxen and slaves are simply property.
Additional differences include:_
• Biblical law imposes limitations on kings (Deut 17:14–20), the laws of the surrounding nations do not—they foster support for the unlimited authority of their kings.
• Biblical laws value human life over property. While surrounding nations might require restitution of thirtyfold for theft (and even execution), biblical law limits restitution to fivefold and spares the thief (Exod 22:1–4).
• Biblical law places a much higher value on women. For example, an unloved wife (even a slave) still had to be given the full rights of a wife.
The main aspects of biblical law that is absent from the laws of other ancient Near Eastern communities are the two underlying themes:
1. Loving God (Deut 6:5)
2. Loving neighbor (Lev 19:18)
This absence is fitting because law in the Hebrew Bible is more than just a law code; it is part of a covenant governing relationships between people and their Creator.
Significance of Ancient Near Eastern Law
The significance of the similarities between the ancient Near Eastern laws and the Old Testament law is debated. Some argue that these similarities indicate that Moses was not inspired—just well read. Others argue that it is fitting that the laws given to Moses would be culturally relevant to his setting (and therefore similar, but not identical, to the laws of the neighboring nations). One value of these other law codes is that they highlight (by way of contrast) the unique covenantal and relational aspects of the biblical law.
Additionally, new studies in ancient Near Eastern law have discredited the 19th century critical view that codes of laws like the Pentateuch must be anachronistic. Since other nations had advanced legal and ethical law codes like these, it is reasonable to assume that Israel might have as well.
Law and Covenant
The Law exists in the context of God’s covenant with Israel; covenant, not law-keeping, is the basis of this relationship. The role of law is to administrate the covenant. The Law provides instruction for things that ruin relationship with God (e.g., idolatry and injustice). It also shows what loving God and others looks like.
Johnson, B. (2016). Law in the Hebrew Bible. In J. D. Barry, D. Bomar, D. R. Brown, R. Klippenstein, D. Mangum, C. Sinclair Wolcott, … W. Widder (Eds.), The Lexham Bible Dictionary. Bellingham, WA: Lexham Press.
I think we can agree with: