It's easy to think that God's aim in rescuing the Israelites out of Egypt was simply to set them free. But God knows true freedom can only be found in worshipping and enjoying him.
Ex 7:15 - 16: Go to Pharaoh in the morning as he goes out to the water. Wait on the bank of the Nile to meet him, and take in your hand the staff that was changed into a snake. 16 Then say to him, ‘The LORD, the God of the Hebrews, has sent me to say to you: Let my people go, so that they may worship me in the desert.