1: This genealogy (Vs 1-17) was written to prove that Jesus was a Descendant of Abraham (Gen 12:3,22:18). And also a Descendant of David (2Sam 7:12, Psa 89:3-4, 132:11). If Jesus were not a descendant of BOTH Abraham and David, He could not have been the Messiah. Therefore Matthew is revealing how Jesus was indeed in the lineage of BOTH Abraham and David by providing the lineage.

Gen 12:3  And I will bless them that bless thee, and curse him that curseth thee: and in thee shall all families of the earth be blessed.
Gen 22:18  And in thy seed shall all the nations of the earth be blessed; because thou hast obeyed my voice.

2Sa 7:12  And when thy days be fulfilled, and thou shalt sleep with thy fathers, I will set up thy seed after thee, which shall proceed out of thy bowels, and I will establish his kingdom.
Psa 89:3-4  I have made a covenant with my chosen, I have sworn unto David my servant, 4  Thy seed will I establish for ever, and build up thy throne to all generations. Selah. 
Psa 132:11  The LORD hath sworn in truth unto David; he will not turn from it; Of the fruit of thy body will I set upon thy throne.