Michael D. Coogan, The Old Testament: A Historical and Literary Introduction to the Hebrew Scriptures, third edition (OUP, 2014), 132.
Both the Code of Hammurapi and the Covenant Code set the laws in an explicitly religious context. In both, it is the deity who is ultimately the source of legal authority, and in both, there is a human intermediary. Thus, as in most other aspects of life in the ancient world, the distinction between sacred and secular was not nearly as sharp as it is in much of the modern world. In both codes, violation of the law is ultimately an offense against the deity.