Yet, with the discernment of a true mother, the Church weighs the great burden of human weakness, and well knows the course down which the minds and actions of men are in this our age being borne. For this reason, while not conceding any right to anything save what is true and honest, she does not forbid public authority to tolerate what is at variance with truth and justice, for the sake of avoiding some greater evil, or of obtaining or preserving some greater good. God Himself in His providence, though infinitely good and powerful, permits evil to exist in the world, partly that greater good may not be impeded, and partly that greater evil may not ensue. In the government of States it is not forbidden to imitate the Ruler of the world; and, as the authority of man is powerless to prevent every evil, it has (as St. Augustine says) to overlook and leave unpunished many things which are punished, and rightly, by Divine Providence. But if, in such circumstances, for the sake of the common good (and this is the only legitimate reason), human law may or even should tolerate evil, it may not and should not approve or desire evil for its own sake; for evil of itself, being a privation of good, is opposed to the common welfare which every legislator is bound to desire and defend to the best of his ability. In this, human law must endeavor to imitate God, who, as St. Thomas teaches, in allowing evil to exist in the world, "neither wills evil to be done, nor wills it not to be done, but wills only to permit it to be done; and this is good.'' This saying of the Angelic Doctor contains briefly the whole doctrine of the permission of evil.
But, to judge aright, we must acknowledge that, the more a State is driven to tolerate evil, the further is it from perfection; and that the tolerance of evil which is dictated by political prudence should be strictly confined to the limits which its justifying cause, the public welfare, requires. Wherefore, if such tolerance would be injurious to the public welfare, and entail greater evils on the State, it would not be lawful; for in such case the motive of good is wanting. And although in the extraordinary condition of these times the Church usually acquiesces in certain modern liberties, not because she prefers them in themselves, but because she judges it expedient to permit them, she would in happier times exercise her own liberty; and, by persuasion, exhortation, and entreaty would endeavor, as she is bound, to fulfill the duty assigned to her by God of providing for the eternal salvation of mankind. One thing, however, remains always true -- that the liberty which is claimed for all to do all things is not, as We have often said, of itself desirable, inasmuch as it is contrary to reason that error and truth should have equal rights.
--Pope Leo XIII, Libertas Praestantissimum, 1888