In theology this is referred to as the problem of Good and Evil.
"Is God willing to prevent evil, but not able?
Then he is not omnipotent.
Is he able, but not willing?
Then he is malevolent.
Is he both able and willing?
Then whence cometh evil?
Is he neither able nor willing?
Then why call him God?"
-- Epicures
This problem was created when Christianity changed most of scripture from poly-theism to mono-theism. Suddenly there was the Devil (Trickster, Chaos, Perturbation, Opposition, Temptation) separate from the Pantheon of Gods (all with their justified functions). This was further exacerbated by anthropomorphizing this very human internal feeling and behavior into a lesser Deity with it own will. Perhaps we did this out of weakness: It is easier to claim some external force seduced you, than to admit you was not strong-willed enough to let ratio celebrate a victory over animalistic urges.
The solution to this problem is to acknowledge Abraxas. In the Seven Sermons to the Dead, and later in the Red Book, Carl Gustav Jung united God into a single God. As He contained both Evil and Good, He is more powerful than the Judeo-Christian God. In that, He is also afraid of itself.
From gnosis.org/library/7Sermons.htm
This is a god whom ye knew not, for mankind forgot it. We name it by its name Abraxas. It is more indefinite still than god and devil.
Light and Darkness.
The Hot and the Cold.
Force and Matter.
Time and Space.
Good and Evil.
Beauty and Ugliness.
The One and the Many.
What the god-sun speaketh is life.
What the devil speaketh is death.
But Abraxas speaketh that hallowed and accursed word which is life and death at the same time.
Abraxas begetteth truth and lying, good and evil, light and darkness, in the same word and in the same act. Wherefore is Abraxas terrible.
It is the lord of the toads and frogs, which live in the water and go up on the land, whose chorus ascendeth at noon and at midnight.