In emphasizing that Jesus is the Son of David, Matthew points back to the prophecies showing that God would raise up a king in the line of David who would be fully God and yet born as a baby, who would become our righteousness before God, whose reign would spread through the whole world, finally judging all the wicked and removing all the effects of sin, and filling the new earth with the knowledge of God.