Arthur Schopenhauer said this quote

the origin of wickedness is the cliff upon which theism, just as much as pantheism, is wrecked; for both imply optimism. However, evil and sin, both in their terrible magnitude, cannot be disavowed; indeed, because of the promised punishments for the latter, the former is only further increased. Whence all this, in a world that is either itself a God or the well-intentioned work of a God?