In “The Problem of Evil,” there are three assertions, and only two fit logically together. The first one is that God is loving, the second is that God is almighty, and the third is that terribly evil things happen.
There is no contradiction between the first two. God may well be full of love even though he is omnipotent. But it is the third assertion that does not fit into the picture. How can a loving God allow horrible things to happen? In addition, he is also supposed to be omnipotent.

Is God then powerless since he apparently has not managed to put an end to evil? Or is he simply indifferent? This is a well-known issue in the philosophy of religion and theology and is called the theodicy problem, a term first used by the German philosopher and mathematician Gottfried Wilhelm Leibniz (1646-1716) in the book Essais de Théodicé (1710) about God’s goodness, man’s freedom and the origin of evil.
Theodicy means “vindication of God” or “justifying God.” But already, the Greek philosophers Heraclitus (540-480 BC), Plato (428-348 BC), and Epicurus (342-271 BC) touched on the problem of evil. Epicurus said,
“Is [God] willing to prevent evil, but not able? Then is he impotent? Is he able but not willing? Then is he malevolent? Is he both able and willing? whence then is evil?” (From Encyclopaedia Britannica quoting Scottish philosopher David Hume in his Dialogues Concerning Natural Religion – 1779.)
This is the classic problem. As it has been formulated, “The Problem of Evil” contains a logical flaw and creates an intellectual barrier that prevents many from believing in God. Throughout the ages, theologians have, of course, tried to modify the three assertions to make them fit together.
Many have solved the whole problem by refusing to believe that God exists. But we know that doesn’t solve anything.
More about the Problem of Evil