It may raise doubts about divine justice. One may ask: If the purpose of creation of man is worshiping God, creation of Iblis runs counter to this goal. Man does a good deed with much effort but it could be ruined as a result of Satan’s temptations.
Here is the answer:
First, God has not created Satan as an evil being but he was created like other beings, given talents and capacities by God. He spent years in worshipping God. However, he committed a grave sin by disobeying God and then refusing to repent and apologize. He conceitedly consider himself to be superior to man:
“(Satan said) ‘I am better than Adam, for You have created me out of fire and Adam out of clay.’” (Verse 12 of Surah Al-A’araf)
So his bad fate was due to his disobedience to God and his rebellion against Him.
Second, Satan’s temptations are not such that they will force us to commit sins. Temptations are nothing more than an invitation to sin. Our will is not destroyed by temptations but can resist them and this resistance is good and positive because our spiritual growth is only possible through resisting temptations and desires.
If someone is mute and does not backbite, it is not worth much because he can’t backbite anyway. If there were no temptations and desires, being righteous would not be that commendable.
Moreover, if someone gives in to temptations, the path of repentance is open and he can return and make up for his wronging as God accepts repentance. Prophet Adam (AS) disobeyed God and ate the forbidden fruit but he then became regretful and repented and God accepted his repentance.
Third, if there were only Satan’s temptations, this question could be logical, but we know that there is also guidance from the intellect, the Fitrat (nature) and the messengers of God, and these sources can guide us to the right path and away from sins and temptations.
Satan dominates only those who make him their friends. So as long as we are not ready, he cannot lead us to the wrong path.
“Satan has certainly no authority over the believers who have trust in their Lord.” (Verse 99 of Surah An-Nahl)
What this verse means is not that Satan cannot tempt believers but it means that true believers know Satan and are vigilant not to fall into the trap of his temptations.
The Quran describes how believers face Satan: “Indeed, when a visitation of satan touches the cautious (worshipers) they remember, and then see clearly.” (Verse 201 of Surah Al-A’araf)