Matthew begins his gospel with the genealogy of Jesus. He refers to Him as the Son of David, the Son of Abraham. Thus, we have an introduction to God’s scheme of Redemption for man. The Redeemer would descend from Abraham, through Isaac, the son of promise (Genesis 12:3), and come from Judah, a descendent of King David (Jeremiah 23:5-6). This listed genealogy is an important piece of evidence that Jesus is our Christ, the Redeemer come from God.
Matthew’s observation of this lineage coming from Joseph, Jesus’ legal father, indicates that this lineage was used by Matthew to express Jesus’ legal right through genealogy to ascend to the position of King, as a descendent of David. The genealogy does not contain all Jesus’ predecessors, only 42 Generations, which served his purpose, and through its artificial grouping of 3 sets of 14 generations served the important purpose of establishing a means of easy memorization. See Luke 3 for a different approach.