To fully understand the giving of the 10 Commandments we must understand the purpose of God throughout the ages. To understand God’s purpose throughout the ages it is important in order to understand an individual age, or period of time. The smaller periods of time cannot be separated from the whole of time, but must be considered within the context of the whole.
From the beginning of man (Gen 1 -2) God wanted for man to live free from sin in a perfect environment (the Garden of Eden) with their Creator. Mankind failed. Giving in to temptation they were driven from the garden (Gen 3:23- 24). And then began man’s descent into unspeakable sin.
This grieved God at His heart (Gen 6:6), and He destroyed the sin-filled world with a world-wide flood. He chose Noah, because he found grace in His (God’s) sight (Gen 6:8). This Noah was able to do because God saw him (Noah) righteous in that generation (Gen 7:1).
Mankind, however, continues his downward progression and in Genesis 10, under the leadership of Nimrod, and his false religion, they once again rebel against God (Gen 11:5). As a result God scattered them by confounding their language and divided them.
He then chooses Abram and separates him and his family (Gen 12:1- 3) from all of the other families and thus begins the creation of nations. Abram was known by God that he would teach not only his immediate family but his entire household (servants/employees) “to do justice and judgment” (Gen 18:18- 19).
Over time, of course, this family fails and ends up serving as slaves in Egypt. There God sends Moses to lead His chosen people out of bondage.
Now as God prepares them for their intended purpose, to be a “kingdom of priests” (Ex. 19:1- 7), He begins to instruct and equip them by separating them from all of the other nations of the earth.
The big picture of course is the purpose that God had intended in the beginning. That is to let man have a kingdom here on this earth where they would live righteous and holy lives enjoying the presence of their Creator and God.