Exodus 20:1—And God spoke all these words: 2] "I am the LORD your God, who brought you out of Egypt, out of the land of slavery.
David Guzik's Exodus commentary makes some of the following observations:
"As an introduction to the Law, God introduces Himself and reminds the Israelites once again what He has done—v. 2. It is because of who God is, and because of what He has done for us, He has the right to tell us what to do—and we have the obligation to obey Him. It's also important to draw the connection that the following Laws were not "invented" here at Mount Sinai.