God set the stage to make Himself known to the people. He has revealed His Name, the power of His mighty hand has compelled Pharaoh to let the Hebrews go, and after Pharaoh and his army were vanquished in the Red Sea, Moses and the Israelites sang a song of praise.
Exodus 15: 1-3 Then Moses and the Israelites sang this song to the LORD. I will sing to the LORD, for He is gloriously triumphant, horse and chariot He has cast into the sea. My strength and my courage is the LORD and He has been my Savior. He is my God, I praise Him; the God of my father, I extol Him. The LORD is a warrior, LORD is His Name!
Thus the Hebrews went into the desert to worship God. It is there that God gave His laws by which they would worship Him.