Iranaeus said God allows evil in the world so we can learn what is right and good, he created a world where good and evil would exist
This is called soul-making, we develop spiritually as we learn from mistakes
God cant stop people from doing evil as this will affect their free will, if people learn from mistakes and become better they can still go heaven