It’s the birth of the free will theodicy! For more on this topic (and many others), this is a good resource.