When Matthew’s gospel opens with a Joseph who has dreams (1:20, 2:13, 2:19, 2:22), we cannot pretend that we have never heard of this sort of thing before. And when Matthew writes: “… an angel of the Lord appeared in a dream to Joseph in Egypt…” we ought to even wonder for a brief second exactly where we are in the Bible. Is this the end of Genesis?
Of course there are many other details that confirm exactly where Matthew wants us. We have a child-murdering Pharaoh in the character of Herod, and Matthew explicitly refers to the first Exodus story by quoting Hosea 11. Only God’s Son is called out of Egypt in order to deliver Israel.
The geography is all reversed. Israel has become an Egypt, and the Israelite king has become a pharaoh. Instead of fleeing to Midian for safety, the holy family flees to Egypt for safety. And when John comes preaching and baptizing, he is inviting Israelites in the Promised Land to embark on a new Exodus, to cross the Jordan and enter the land again, in a new way.