Matthew 2:15, Called Out of Egypt
And [Jesus, Mary and Joseph were] there until the death of Herod: that it might be fulfilled which was spoken of the Lord by the prophet, saying, Out of Egypt have I called my son.
//Jesus was apparently from Nazareth, but prophecy foretold that Israel’s savior would be born in Bethlehem. So our two New Testament birth stories contrive a way to put Jesus’s birth there. In Luke’s version of the virgin birth, Joseph travels to Bethlehem for a census, and there the child is born, after which the family returns to Nazareth. But in Matthew’s version, Joseph appears to live initially in Bethlehem, and they are uprooted by the threat of King Herod’s infanticide. They flee to Egypt, live there a while, and then decide to relocate in Nazareth.
Why this detour to Egypt in Matthew’s honorific story? He is referencing Hosea 11:1:
When Israel was a child, then I loved him, and called my son out of Egypt.
Hosea dreams of the day Israel will be restored, and hundreds of years later Matthew sees Jesus as the savior who would restore Israel. As God led his “child” Israel out of Egypt in the great exodus, so Jesus becomes the next child of God.
By telling this story of Jesus being called out of Egypt, Matthew is honoring Jesus and pointing to him as the fulfillment of Hosea’s dreams. Did it really happen? That’s hardly important.