The Zohar, Chapter “Ki Tissa (When You Take),” Item 50: There is no father so merciful to His children as the Creator, as it is written, “That not one thing has failed of all the good things.” …But since it said, “Of all the good things,” and left the bad behind, meaning that He left the bad things He said about Israel aside and they did not come true, this is where His mercies are seen. This is because He does not wish to do a bad thing.
The world exists based on two forces; therefore, it is impossible not to have evil. Goodness is revealed from evil and is built within it. So the problem isn’t that evil exists in the world, but the way we reveal it.
Either evil is revealed in all its loathsomeness and filth, through the worst, crudest manifestations, or we arm ourselves with the force of the right line, in which case we reveal it with joy. We correct it and immediately transform it to goodness.
Either way, evil must be revealed. Everything depends on our aspiration.