"In the ancient Near East, people believed that no one could accomplish everything that the gods required so there would always be something to anger the gods. Nothing could be done about this but strive for a higher degree of piety and call out for mercy upon the inevitable failure."
As I read this, I couldn't help but marvel at the graciousness of our God. Unlike the pagan deities surrounding Israel, Yahweh descended on Mount Sinai in full view of His people and explained exactly how His kingdom worked and what kinds of things offended Him and pleased Him. His law was not one that could not be followed like the pagan gods. What a relief this must have been to the Israelites. In fact, unlike the pagan deities who don't seem to care if humans live or die, one of His great concerns was that His people would do something that would get them killed, which is why He is always telling them not to bring abominations or uncleaness into the camp. He even tells the Levites that they were to surround the Tabernacle with their tents. This provided a barrier to protect the people from God's Holiness by getting to close when they were unclean, causing them to be struck down. Numbers 1:52-53
Moses separates Yahweh from the pagan view of pleasing their gods when he says,
"11 “For this commandment which I command you today is not too mysterious for you, nor is it far off. 12 It is not in heaven, that you should say, ‘Who will ascend into heaven for us and bring it to us, that we may hear it and do it?’ 13 Nor is it beyond the sea, that you should say, ‘Who will go over the sea for us and bring it to us, that we may hear it and do it?’ 14 But the word is very near you, in your mouth and in your heart, that you may do it. Deuteronomy 30:11-14The New Testament makes it clear it's authors also believed that God had given His law believing it could be kept, when writing this description of Zachariah and Elizabeth.
6 And they were both righteous before God, walking in all the commandments and ordinances of the Lord blameless. Luke 1:6
When you compare the two systems of thought it comes as no surprise God's people were so grateful for the Torah and, at least after the Babylonian exile, saw it as a treasure. No wonder the longest Psalm (Psalms 119) is written extolling the virtues of the Torah and the author's love for it. Remember every time the author writes law in this psalm the Hebrew word used is Torah, usually, but not always, understood as the first 5 books of Moses.
It is easy to understand the clear joy that the Psalmist finds in the law when comparing the Torah with the despair found in this pagan Ancient Near East song known as, "I Will Praise the God of Wisdom.
"I wish I knew that these things were pleasing to one's god! What is proper to oneself is an offence to one's god. What in one's own heart seems despicable is proper to one's god. Who knows the will of the gods in heaven? Who understands the plans of the underworld gods? Where have mortals learnt the way of a god?"
No wonder the Psalmist declares,
"The law of Your mouth is better to me than thousands of coins of gold and silver."It is also easier to understand why Moses said that the nations would be attracted to Israel if they (Israel) were faithful to follow God's requirements,
" 6 Therefore be careful to observe them; for this is your wisdom and your understanding in the sight of the peoples who will hear all these statutes, and say, ‘Surely this great nation is a wise and understanding people.’7 “For what great nation is there that has God so near to it, as the Lord our God is to us, for whatever reason we may call upon Him? 8 And what great nation is there that has such statutes and righteous judgments as are in all this law which I set before you this day?" Deuteronomy 4:6-8These really are the reasons we should take joy in the law today. God has shown us how to be close to Him and live out His kingdom. Hopefully it is a blessing we will take delight in.