I'm currently doing some work on Matthew's gospel, and have briefly looked at his genesis narrative (1:1-2:23). This is a fascinating account. For more, see the entries by Goodacre, Bird, articles here, virgin birth here, and history in the infancy narrative here.
Matthew writes the next great Act in Israel’s developing story. The opening genealogy immediately recalls Israel’s sacred writings, as Matthew tells “the story of the genesis of Jesus the Messiah, son of David, son of Abraham.” In connecting the story of Jesus with the story of two of Israel’s greatest heroes, the founder Abraham, and the great king David, Matthew appropriately opens the New Testament Scriptures by immediately connecting them to the story of God and his people, Israel. Given Matthew’s concern for including the Gentiles, it is likely he sees Jesus as the means by which YHWH will fulfil his promise to Abraham to make him a great nation, and through him to bless all the families of the earth (Gen 12:1-3). By connecting Jesus to David in the beginning and throughout the narrative (cf. 9:27; 12:23; 15:22; 20:30–31; 21:9, 15; cf. 22:42), Matthew shows us Jesus’ Davidic decent which was a necessary aspect of God’s Messiah (22:42), and thus Jesus is seen as an heir to the Davidic throne. Tom Wright is at this point very helpful where he notes the following:
[[Matthew presupposes a telling of the Jewish story according to which Israel has failed, has ended in exile, and needs a new exodus; and he undertakes to show that this new exodus was accomplished in the life, death, and resurrection of Jesus. He does this at a multiplicity of levels: the often-remarked ‘fulfilment’ passages (‘All this took place to fulfil what had been spoken by the Lord through the prophet…’) are simply the tip of a very large iceberg. Matthew’s plot and structure presupposed the entire Jewish story-line to date. They claim to be bringing about that of which Moses spoke in Deuteronomy 30. They are not simply a collection of types, historical precedents arbitrarily repeated. They claim to be the continuation and proper completion of the whole history itself. Jesus, for Matthew, is both the new David and the new Moses, but also something more. Moses had promised that
YHWH your God himself will cross over before you. He will destroy these nations before you, and you shall dispossess them. Joshua also will cross over before you, as YHWH promised… Be strong and bold; have no fear or dread of them, because it is YHWH your God who goes with you; he will not fail you or forsake you (Dt. 31:3-6).
For Matthew, Jesus is the fulfilment of both parts of this prophecy. He is Emmanuel, Israel’s god in person, coming to be with his people as they emerge from their long exile, remaining with them still as they go on to possess the land (1:23; 28:20). And the land they now possess is the whole world; as the wise men from the east came to pay homage to Jesus, as the centurion demonstrated a faith which Jesus ‘had not found in Israel’, and as the Canaanite women had ‘great faith’, so the ministry of Jesus, which at the time was only to the ‘lost sheep of the house of Israel’, will result in salvation for ‘all nations’.]]
[N. T. Wright, The New Testament and the People of God, pg. 388-89] I am increasingly persuaded that rather than a waste of time, Matthew's opening chapters, including the genealogy, provide the necessary context for understanding Matthew's entire gospel. Just as the Sermon on the Mount cannot be isolated from the gospel of Matthew, so too, it is unwise to isolate Matthew's gospel from it's own genesis narratives. As Dale Allison instructively notes: The broader context must always be kept in mind. Likening the First Gospel to a sentence, the Sermon is only one word: and who could determine the meaning of a word while ignoring the sentence in which it occurs? [Allison, The Sermon on the Mount, pg. 10]