14 And this because the questions are many and frequent. See, for instance, at once in the beginning of his Gospel, how many difficulties might be raised one after the other. As first, wherefore the genealogy of Joseph is traced, who was not father of Christ. Secondly, whence may it be made manifest that He derives His origin from David, while the forefathers of Mary, who bare Him, are not known, for the Virgin's genealogy is not traced? Thirdly, on what account Joseph's genealogy is traced, when he had nothing to do with the birth; while with regard to the Virgin, who was the very mother, it is not shown of what fathers, or grandfathers, or ancestors, she is sprung.
And along with these things, this is also worth inquiry, wherefore it can be, that, when tracing the genealogy through the men, he has mentioned women also; and why since he determined upon doing this, he yet did not mention them all, but passing over the more eminent, such as Sarah, Rebecca, and as many as are like them, he has brought forward only them that are famed for some bad thing; as, for instance, if any was a harlot, or an adulteress, or a mother by an unlawful marriage, if any was a stranger or barbarian. For he has made mention of the wife of Uriah, and of Thamar, and of Rahab, and of Ruth, of whom one was of a strange race, another an harlot, another was defiled by her near kinsman, and with him not in the form of marriage, but by a stolen intercourse, when she had put on herself the mask of an harlot; and touching the wife of Uriah no one is ignorant, by reason of the notoriety of the crime. And yet the evangelist has passed by all the rest, and inserted in the genealogy these alone. Whereas, if women were to be mentioned, all ought to be so; if not all but some, then those famed in the way of virtue, not for evil deeds.
See you how much care is required of us straightway in the first beginning? And yet the beginning seems to be plainer than the rest; to many perhaps even superfluous, as being a mere numbering of names.
After this, another point again is worth inquiry; wherefore he has omitted three kings. For if, because they were exceeding ungodly, he therefore passed by their names in silence, neither should he have mentioned the others, that were like them.
And this again is another question; why, after having spoken of fourteen generations, he has not in the third division maintained the number.
And wherefore Luke has made mention of other names, and not only not all of them the same, but also many more of them, while Matthew has both fewer and different, though he too has ended with Joseph, with whom Luke likewise concluded.
You see how much wakeful attention is needed on our part, not only for explanation, but even that we may learn what things we have to explain. For neither is this a little matter, to be able to find out the difficulties; there being also this other hard point, how Elizabeth, who was of the Levitical tribe, was kinswoman to Mary.
Source: Homilies on the Gospel of St. Matthew (New Advent)