One prophesy of the Old Testament is that our Savior would be from the “House of David” as we see in Isaiah 9:6-7 “For unto us a child is born… The mighty God, The everlasting Father, The Prince of Peace…upon the throne of David”
Jesus needed to fulfill this prophesy by coming from the house of David. Matthew 1 clearly shows the family lineage of Jesus through his father Joseph back to David.
But wait…How could Jesus be of the house of David if Joseph didn’t conceive Jesus? In a sense, Joseph was really only Jesus’ foster father.
The answer is in Luke 3 which shows that Mary (Jesus’ mother) was also from the house of David. Mary’s lineage was not through King David’s son Solomon, but through King David’s son Nathan.
Thus we see both the family name AND the genealogy of Jesus is from the House of David through both the (foster) father Joseph and the natural mother Mary. Thus fulfilling the Isaiah prophesy in the fullest manner.