According the infallibility of scripture, do ancient near east laws (ANE laws) really explain the derivation of the laws of Moses? In the last 100 years, archaeology has discovered many ancient bodies of law including Sumerian, Babylonian, Hittite, Assyrian and Canaanite ancient laws. This has caused a lot of significant hoopla among interpreters of the first five books of the Bible. For example Hammurabi's Code has been often referred to in modern attempts at exegesis of the Torah. You could say this is one of the ‘modern’ discoveries of our time. Not quite as significant as the ‘dead sea scrolls’ but significant enough to stir various biblical scholars.

One reason for the stir is that it has dismissed earlier false biblical criticisms that the laws of Moses could have never been written at the time they were allegedly written, as nobody had advanced laws at that time. This seems based on a natural non-faith based derivation of scripture but that was the argument.  However as these poor ideas of ‘modern biblical knowledge’ are washed aside, a new theory is taking its place, namely the laws of Moses are basically a collection of some of the best laws at the time. Fully natural to understand them now.

The question I ask is, does this really explain how the laws of Moses came into being? 

Note: I am asking for an answer based on a belief in the infallibility of scripture.
If anything, it says that God is both generous and accommodating. There are two scenarios that should be considered:


God granted the same knowledge of what good governance should look like. This says that God's glory will in fact be shown in all nations, as he himself proclaimed.  (Gen 12 and Psalm 2 come to mind, but there are others)
If the other nations derived these laws completely independently of Gods prompting, then it can be argued equally as well that God knew what his people could bear, and strove to make them unique to a point (the sacrifices etc), but also understood that there was a limit to that. When the children of Israel wanted a king, for example, he relented. He knew it was suboptimal, but heard their cries nonetheless. 


Either case shows that it would not be inconsistent with God's character to repeat Himself or others in choosing optimal laws. 

Indeed, one oft-cited constraint of perfection is immutability. If something is perfect, it cannot change. There is nothing to suggest that optimality behaves differently. There really is a best way to connect two points, for example.