Matthew wrote his gospel for a Jewish audience. He did so in a way that mirrored Moses and the Torah (the Five books of Moses: Genesis, Exodus, Leviticus, Numbers, and Deuteronomy).
Matthew 1 Is Like Genesis
Genesis is the opening of the Bible, so too is Matthew 1 the opening of the Gospel. Just as Genesis is full of genealogies and introduces the main characters and themes in the story, so too, Matthew 1 begins with an introduction to the main characters and themes of the Gospels. One of the first words that Matthew uses is genesis. Matthew 1:1 reads “The book of the generation [Greek = genesis] of Jesus Christ, the son of David, the son of Abraham”, clearly calling to mind for readers the first book of the Old Testament.
Matthew 2 Is Like Exodus
Matthew 2 corresponds to Exodus. In the Book of Exodus, there is miraculous birth of a prophetic figure who is pursued by a king wishing to kill the prophet. So too, in Matthew 2, Jesus the new prophet is miraculously born and then pursued by a king who wishes to kill him. In Exodus God brings His chosen people out of Egypt and leads them to the Promised Land. In Matthew 2, Jesus as God’s Chosen Son is lead out of Egypt to the Promised Land of Israel.