In Christianity and Judaism (not certain re Islam) a perfect God is believed to have created the universe and created humans “In His image.” This implies that humans were created perfect. Yet humans spoiled the original perfection by choosing to disobey God. That premise is plain silly! How can imperfection come from perfection? Perfection in and of itself indicates the inability for imperfection. Furthermore, a perfect Creator cannot, without intent, create anything imperfect. Therefore, a perfect God who creates imperfect humans, without intent, is impossible.
The Christian explanation (to my recollection, not in the Book) of God’s “gift” of free will doesn’t answer the perfection implications. Christian’s feeble attempt is; “God gave humans free will to enable them to experience emotions like love and happiness.” Believers say without free will humans would be little more than robots. However, this free will idea is difficult to find in the Bible and it seems any insinuation of free will is quickly expunged by one stroke of the quill (Matthew 6:10) -- “Thy will be done in earth as in heaven”.
Free will seems to be the response to the paradox offered by the Greek philosopher Epicurus regarding God’s inability to control evil. To paraphrase Epicurus, he stated that either God can prevent evil and chooses not to, which makes him less than merciful or He can’t prevent evil, which makes him less than omnipotent. This was of course unacceptable to the Church so the answer was clear. Free will.