Here’s a thing.
Netflix’s software engineers put into Netflix a program called the ‘chaos monkey.’ Its job is to go through Netflix’s servers, randomly wreaking havoc.
Why do they do this? Because they wanted to be ‘constantly testing our ability to succeed despite failure.‘ Chaos monkey taught them to build programmes that continue to work with bad stuff happening all around. The random, mindless destructivity leads to better systems.
As Augustine says (Enchiridion xi): “Since God is the highest good, He would not allow any evil to exist in His works, unless His omnipotence and goodness were such as to bring good even out of evil.” This is part of the infinite goodness of God, that He should allow evil to exist, and out of it produce good.
Evil is God’s chaos monkey, and the world is better for it.