There are a number of theories, some more complicated than others, as to why these two gospels differ so much in the genealogy of Jesus. A commonly held theory is that Matthew's is detailing the ancestry of Joseph, while Luke's is detailing the lineage of Mary. This is consistent with Luke's focus on Mary, and women in general, in his gospel. Because he was an historian as well as a physician, Luke was concerned with relating the story of Jesus accurately, and with an emphasis on chronology, and a thorough discussion of those around Jesus during his ministry. The fact that women played an important role in the ministry of Jesus was an important digression from business as usual, as women were normally seen as less important, sometimes treated almost as if they were not even human. Luke clearly viewed the role of women as an integral part of Jesus's life and teaching, relating as he did Mary's Magnificat with special detail and focus And so it fits to think that Luke might have traced the lineage of Jesus through his mother, given his focus on women in other parts of the gospels.