5 Do you see that it was not for few nor small causes that he brought to our remembrance the whole history concerning Judah? For this end he has mentioned Ruth also and Rahab, the one an alien, the other an harlot, that you may learn that He came to do away with all our ills. For He has come as a Physician, not as a Judge. Therefore in like manner as those of old took harlots for wives, even so God too espoused unto Himself the nature which had played the harlot: and this also prophets from the beginning declare to have taken place with respect to the Synagogue. But that spouse was ungrateful towards Him who had been an husband to her, whereas, the Church, when once delivered from the evils received from our fathers, continued to embrace the Bridegroom.
See, for instance, what befell Ruth, how like it is to the things which belong to us. For she was both of a strange race, and reduced to the utmost poverty, yet Boaz when he saw her neither despised her poverty nor abhorred her mean birth, as Christ having received the Church, being both an alien and in much poverty, took her to be partaker of the great blessings. But even as Ruth, if she had not before left her father, and renounced household and race, country and kindred, would not have attained unto this alliance; so the Church too, having forsaken the customs which men had received from their fathers, then, and not before, became lovely to the Bridegroom. Of this therefore the prophet discourses unto her, and says, “Forget your people, and your father's house, so shall the king have pleasure in your beauty.” This Ruth did too, and because of this she became a mother of kings, even as the Church did likewise. For of her David himself sprung. So then to shame them by all these things, and to prevail on them not to be high-minded, he has both composed the genealogy, and brought forward these women. Yes, for this last, through those who intervened, was parent to the great king, and of these David is not ashamed. For it cannot, nay, it cannot be that a man should be good or bad, obscure or glorious, either by the virtue or by the vice of his forefathers; but if one must say somewhat even paradoxical, he shines forth the more, who not being of worthy ancestors, has yet become excellent.
Source: Homilies on the Gospel of St. Matthew (New Advent)