Pope Pius XII
Mystici Corporis Christi §66
Mystici Corporis Christi: On the Mystical Body of Christ
66 And if at times there appears in the Church something that indicates the weakness of our human nature, it should not be attributed to her juridical constitution, but rather to that regrettable inclination to evil found in each individual, which its Divine Founder permits even at times in the most exalted members of His Mystical Body, for the purpose of testing the virtue of the Shepherds no less than of the flocks, and that all may increase the merit of their Christian faith. For, as We said above, Christ did not wish to exclude sinners from His Church; hence if some of her members are suffering from spiritual maladies, that is no reason why we should lessen our love for the Church, but rather a reason why we should increase our devotion to her members. Certainly the loving Mother is spotless in the Sacraments by which she gives birth to and nourishes her children; in the faith which she has always preserved inviolate; in her sacred laws imposed on all; in the evangelical counsels which she recommends; in those heavenly gifts and extraordinary grace through which with inexhaustible fecundity, she generates hosts of martyrs, virgins and confessors. But it cannot be laid to her charge if some members fall, weak or wounded. In their name she prays to God daily: "Forgive us our trespasses;" and with the brave heart of a mother she applies herself at once to the work of nursing them back to spiritual health. When, therefore, we call the Body of Jesus Christ "mystical," the very meaning of the word conveys a solemn warning. It is a warning that echoes in these words of St. Leo: "Recognize, O Christian, your dignity, and being made a sharer of the divine nature go not back to your former worthlessness along the way of unseemly conduct. Keep in mind of what Head and of what Body you are a member."
Source: Mystici Corporis Christi (Vatican.va)