30 Enough has now been said to show that the question, why the generations are reckoned through Joseph and not through Mary, ought not to perplex us; for as she was a mother without carnal desire, so was he a father without any carnal intercourse. Let then the generations ascend and descend through him. And let us not exclude him from being a father, because he had none of this carnal desire. Let his greater purity only confirm rather his relationship of father, lest the holy Mary herself reproach us.
For she would not put her own name before her husband; but said, “Your father and I have sought You sorrowing.” Let not then these perverse murmurers do that which the chaste spouse of Joseph did not. Let us reckon then through Joseph, because as he is in chastity a husband, so is he in chastity a father. And let us put the man before the woman, according to the order of nature and the law of God. For if we should cast him aside and leave her, he would say, and say with reason, “Why have you excluded me?
Why do not the generations ascend and descend through me?” Shall we say to him, “Because you did not beget Him by the operation of your flesh?” Surely he will answer, “And is it by the operation of the flesh that the Virgin bare Him? What the Holy Spirit wrought, He wrought for both.” “Being a just man,” says the Gospel. The husband then was just and the woman just. The Holy Spirit reposing in the justice of them both, gave to both a Son. In that sex which is by nature fitted to give birth, He wrought that birth which was for the husband also.
And therefore does the Angel bid them both give the Child a name, and hereby is the authority of both parents established. For when Zacharias was yet dumb, the mother gave a name to her newborn son. And when they who were present “made signs to his father what he would have him called, he took a writing-table and wrote” the name which she had already pronounced. So to Mary too the Angel says, “Behold, you shall conceive a Son, and shall call His name Jesus.” And to Joseph also he says, “Joseph, you son of David, fear not to take unto you Mary your wife; for That which is conceived in her is of the Holy Ghost.
And she shall bring forth a Son, and you shall call His name Jesus, for He shall save His people from their sins.” Again it is said, “And she brought forth a Son to him,” by which he is established to be a father, not in the flesh indeed, but in love. Let us then acknowledge him to be a father, as in truth he is. For most advisedly and most wisely do the Evangelists reckon through him, whether Matthew in descending from Abraham down to Christ, or Luke in ascending from Christ through Abraham up to God.
The one reckons in a descending, the other in an ascending order; but both through Joseph. And why? Because he is the father. How the father? Because he is the more undeniably a father in proportion as he is more chastely so. He was thought, it is true, to be the father of our Lord Jesus Christ in another way: that is, as other parents are according to a fleshly birth, and not through the fruitfulness of a wholly spiritual love. For Luke said, “Who was supposed to be the father of Jesus.” Why supposed?
Because men's thoughts and suppositions were directed to what is usually the case with men. The Lord then was not of the seed of Joseph, though He was supposed to be; yet nevertheless the Son of the Virgin Mary, who is also the Son of God, was born to Joseph, the fruit of his piety and love.
Source: Sermons on Selected Lessons of the New Testament (New Advent)