This article shows that the purpose of Matthew 1 is to establish a link between Jesus and David. Matthew established this link by explaining how Joseph extended his genealogy to Jesus through adoption. Jesus was not born a son of David, but he became a son of David because Joseph obeyed God.
Source: Reformed Perspectives Magazine, 2005. 8 pages.