Matthew wants to show that Jesus is the King of the Jews, David’s Son and David’s Lord. For in the first century it was widely understood that the Messiah was to be from the line of David, to the point where “son of David” had become a messianic title.
1 The book of the genealogy of Jesus Christ, the son of David, the son of Abraham.