The problem of evil: How does an infinitely merciful & compassionate Allah create an evil Shaitan to plague us every day of our lives?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
First of all, please note that Satan is not the only bad creature. The history can tell you a long list of many humans who killed many innocents and/or misdirected their followers. Qur'an also says we should seek refuge to the Lord, not only from the devil we cannot see, but also from the devils we see among humans:
But why these extremely bad creatures are created by God?
None of them were bad just after they were created. As @owari answered, Satan was worshipping the Lord for a very long time. But it was free to make good or bad choices, and once it made bad choice when Human was created (as @owari referenced)
None of the murderers were bad people just after born. They were cute and innocent children, but they were free to make good or bad choices, and they made bad choices during their lives.
Why God made Satan or murderers free to make bad choices?
The freedom to make choices is one of the great gifts of the Lord to the creatures. Without it, belief or worship of the Lord would be of zero value, because it would be just of force, not choice.
I just want to quote from tafseer Al-mizan by grand allamah tabataba'i, a contemporary Islamic philosopher:
This answers the question of why he has been given the time to misguide the people. About his creation though @owari has elaborated. You can refer to the tafseer of Surah a'raf 1:25 to read more about this (unfortunately only in Persian and Arabic for now).
Hope this helps,