In the first place, God forms his people into a nation, distinguishing them from the Egyptians and showing them that they have no permanent home there. In this way, God is preparing his people to leave Egypt and to take up residence in Canaan, just as he had promised to the patriarchs. Secondly, God uses Israel’s suffering to turn his people to himself. As noted earlier (see comment on Exodus 1:12), Israel was not faithful to the Lord while in Egypt, but their harsh existence eventually leads them to cry out for deliverance (Exodus 2:23). Finally, God is teaching Israel (and us, by extension) that their deepest need is to be delivered from the dominion of sin and Satan, as embodied in Pharaoh. Such deliverance brings true freedom—freedom to dwell with God and to serve him alone.
22 Then Pharaoh commanded all his people, “Every son that is born to the Hebrews you shall cast into the Nile, but you shall let every daughter live.”