The birth narrative in Matthew is told entirely from Joseph’s point of view, and like his namesake in the final 21 chapters of Genesis, Joseph is a dreamer of dreams. Through dreams God communicates with him, telling him to take Mary as his wife, to flee the murderous cruelty of Herod, to return to Israel, and to make his home outside Judea. It is even possible that, like Joseph of old, he was the one who interpreted the dream of the Magi, warning them not to return to Herod, for how would anyone know about it unless the Magi had told someone, and who better to tell than Joseph?
The first two chapters of Matthew recall the history of Israel and various prophecies about the coming Messiah, some of which don’t seem so much prophetic as historical. The story of the Magi serves to recall the prophesied birthplace of the Messiah in Bethlehem. It also introduces a recurring theme in Matthew of acceptance by Gentiles and rejection or dismissal by the Jews. Though the Magi threw all Jerusalem into consternation with their talk of searching for a recently born king, there is no record that anyone from Jerusalem accompanied them to Bethlehem to find the child. So the Jews are repeatedly agitated by Jesus, but very few become his followers, and within a few decades of his resurrection, his Gentile followers outnumber his Jewish followers.
The coming of the Magi also provides the impetus for the flight into Egypt, where Jesus lived with Joseph and Mary until the death of Herod. Matthew appropriates a verse from Hosea, where it was clearly meant as a reference to the Exodus, and applies it to Jesus. “Out of Egypt I called my son.” In doing so, he seems to authorize a reinterpretation of the Old Testament that centers on Christ.
The most troubling reference to prophecy is the last, where Matthew refers apparently to multiple prophecies or to a general consensus of prophets that the Messiah would be called a Nazarene. There is actually no such prophecy in the Old Testament nor in any extant text that might have been considered prophetic. Moreover, the town of Nazareth is likewise never mentioned prior to the gospels. However, Jesus was repeatedly referred to as “of Nazareth,” so much so that his followers were said to be “of the Nazarene sect” many years later when Paul was arrested in Jerusalem (Acts 24:5). It’s possible that Nazareth had taken on a pejorative meaning, much as we might say someone was from Podunk, meaning an insignificant hick town. In this view, Matthew was summing up a prophetic tradition in Judaism which held that the Messiah would come from humble origins. This would also explain why he refers to “prophets” rather than to a single “prophet” as in other passages in the chapter.
After chapter 2, Joseph never makes another appearance in Matthew, although we are told that Jesus had a brother named Joseph, along with James, Judas, and Simon. We also learn that Joseph was a carpenter. So after taking pains to present Joseph as a dreamer like Joseph of old, Matthew tells us almost nothing else about him.