Matthew and Luke showed that Joseph was a legal parent, but not a genetic parent to Jesus. Jesus was miraculously conceived in Mary, through the Holy Spirit. By virtue of being Mary's husband, Joseph was considered the father of Jesus. Since Jesus was born into Joseph's family, he was a legal heir. Through Joseph, Jesus obtained a rightful claim to the throne of David.
Although Jesus was a legal descendant to Joseph, he was not a physical descendant. Luke's genealogy directly addressed this issue by stating Jesus was "supposedly the son of Joseph" (Luke 3:23). Clearly, people had assumed that Joseph was the biological father of Jesus, when in fact he was not (Matthew 13:55).
Who was Joseph's Father?
At first glance, Matthew and Luke appear to be in disagreement as to who Joseph's father was. Matthew states he was the son of Jacob, while Luke states he was the son of Heli. Fortunately, an unlikely source has aided scholars in unraveling this mystery.
The Jerusalem Talmud indicates that Mary was the daughter of Heli (Haggigah, Book 77, 4). Joseph was the son-in-law of Heli. Luke could rightfully call Joseph the "son of Heli" because this was in compliance with use of the word "son" at that time. Moreover, designating a son-in-law as a son had scriptural precedent. Refer to Son in Jewish Genealogies for more on this topic. Thus, Joseph was the son of Jacob, and the son-in-law of Heli.