Matt. I. 17.
“So all the generations from Abraham to David are fourteen generations, and from David until the carrying away into Babylon are fourteen generations, and from the carrying away into Babylon unto Christ are fourteen generations.”
He has divided all the generations into three portions, to indicate that not even when their form of government was changed did they become better, but alike under an aristocracy, and under a king, and under an oligarchy, they were in the same evil ways, and whether popular leaders, or priests, or kings controlled them, it was no advantage to them in the way of virtue.
But wherefore has he in the middle portion passed over three kings, and in the last, having set down twelve generations, affirmed them to be fourteen? The former question I leave for you to examine; for neither is it needful for me to explain all things to you, lest ye should grow indolent: but the second we will explain. To me then he seems in this place to be putting in the place of a generation, both the time of the captivity, and Christ Himself, by every means connecting Him with us. And full well does he put us in mind of that captivity, making it manifest that not even when they went down there, did they become more sober-minded; in order that from everything His coming may be shown to be necessary.
“Why then,” one may say, “does not Mark do this, nor trace Christ's genealogy, but utter everything briefly?” It seems to me that Matthew was before the rest in entering on the subject (wherefore he both sets down the genealogy with exactness, and stops at those things which require it): but that Mark came after him, which is why he took a short course, as putting his hand to what had been already spoken and made manifest.
How is it then that Luke not only traces the genealogy, but does it through a greater number? As was natural, Matthew having led the way, he seeks to teach us somewhat in addition to former statements. And each too in like manner imitated his master; the one Paul, who flows fuller than any river; the other Peter, who studies brevity.
Source: Homilies on the Gospel of St. Matthew (New Advent)