CATECHISM OF THE CATHOLIC CHURCH
SECOND EDITION

Paragraphs 310–313

310 But why did God not create a world so perfect that no evil could exist in it? With infinite power God could always create something better. But with infinite wisdom and goodness God freely willed to create a world "in a state of journeying" towards its ultimate perfection. In God's plan this process of becoming involves the appearance of certain beings and the disappearance of others, the existence of the more perfect alongside the less perfect, both constructive and destructive forces of nature. With physical good there exists also physical evil as long as creation has not reached perfection.
311 Angels and men, as intelligent and free creatures, have to journey toward their ultimate destinies by their free choice and preferential love. They can therefore go astray. Indeed, they have sinned. Thus has moral evil, incommensurably more harmful than physical evil, entered the world. God is in no way, directly or indirectly, the cause of moral evil. He permits it, however, because he respects the freedom of his creatures and, mysteriously, knows how to derive good from it:

For almighty God. . ., because he is supremely good, would never allow any evil whatsoever to exist in his works if he were not so all-powerful and good as to cause good to emerge from evil itself.

312 In time we can discover that God in his almighty providence can bring a good from the consequences of an evil, even a moral evil, caused by his creatures: "It was not you", said Joseph to his brothers, "who sent me here, but God. . . You meant evil against me; but God meant it for good, to bring it about that many people should be kept alive." From the greatest moral evil ever committed - the rejection and murder of God's only Son, caused by the sins of all men - God, by his grace that "abounded all the more", brought the greatest of goods: the glorification of Christ and our redemption. But for all that, evil never becomes a good.
313 "We know that in everything God works for good for those who love him." The constant witness of the saints confirms this truth:

St. Catherine of Siena said to "those who are scandalized and rebel against what happens to them": "Everything comes from love, all is ordained for the salvation of man, God does nothing without this goal in mind."

St. Thomas More, shortly before his martyrdom, consoled his daughter: "Nothing can come but that that God wills. And I make me very sure that whatsoever that be, seem it never so bad in sight, it shall indeed be the best."

Dame Julian of Norwich: "Here I was taught by the grace of God that I should steadfastly keep me in the faith... and that at the same time I should take my stand on and earnestly believe in what our Lord shewed in this time - that 'all manner [of] thing shall be well.'"