I don't know how many people have this problem, but I've heard some people question the justification of God's punishment of Satan. According to the traditional narrative, Satan (then known as Iblis) was commanded to prostrate before Adam (peace be on him), but he refused. God punished this crime by banishing him from heaven. Some people think this punishment was over-the-top, for two main reasons- one, this command of God was unfair seeing Iblis worshiped God for so many eons, and yet God is apparently giving more honor to Adam. Two, the main reason why Satan refused to obey this command was out of jealousy for God's love. He couldn't withstand the fact that his beloved was supposedly honoring and loving someone else more than him, in spite of all of his efforts.
Let's address the second one first. As perceptive readers may have guessed, this whole psychoanalysis of Satan may be originate from non-Islamic (Christian?) concepts of who Iblis/Satan was, a fallen angel. The Qur'an makes no pretenses as to what Satan's motives were- it was disbelief (kufr), pride and racism (species-ism?). God knew beforehand what Satan's motives were, where his loyalties truly lay- and it was the manifestation of this hidden kufr/disbelief for which he was taken to task. Additionally, we don't see any complexity in the God-Satan discussion in the Qur'an. It was simply a matter of Satan saying "Adam was made from clay, I was made from fire, and I am better than him by virtue of my birth". This is as clear a demonstration of pride, arrogance and racism as things get. We don't see any discussion on Satan's supposed "love" for God. If it were that, not only would he not have been punished, wallahu 'alam- because God knows what our innermost thoughts are and His verdict on us is carried out on the basis our intentions, as opposed to our actions- but it's also plausible to think that God would have given him the benefit of doubt and answered his sincere questions. Why do I say that? Because almost this exact scenario played out between the angels and God not too far back before Satan's rejection of man. Angels too were confused and dumbfounded at God's decision to create Adam, and they questioned God regarding this apparently baffling decision. Did God banish the angels, or think their question/doubt was inappropriate? Not at all, but He answered their questions in the course of His creation of Adam. It's crystal clear that if Satan had any sincere doubt/question about this, his curiosity would have been satiated by God. But again, God punished Satan for his arrogance, disbelief and pride, not anything else. Here's Surah Al-A'raf, 7:12-
"[Allah] said, "What prevented you from prostrating when I commanded you?" [Satan] said, 'I am better than him. You created me from fire and created him from clay.'"
Really, this is as clear cut and explicit as things get.
Now let's go back to the first question. The key source of this problem is when we try to imagine ourselves being in Satan's shoes, and then thinking how God's command would have made us feel. That's a fundamentally wrong approach to answering this question. We are not, nor could we ever be (not in this life at least), in the position to relate to the position or circumstances of Satan. We live our lives without ever seeing God, or even having any sort of a deep experiential knowledge of God- our life is bound strictly by the rules of this earth. The world often seems to be not make sense, we don't experience regular miracles, nor are we living at the times of the Prophets. Our circumstances themselves place us in a considerable distance from God and His experience. Add to that our sins and other sociological factors that distance us from God even more. None of us (or at least, very few of us) spend all or most of our time in worship. Our last names may be Muslim, but our life is, for the most part, thoroughly "secular".
Now this is the exact opposite of how Satan's situation was. Satan- before he became Satan- was considered to be one of God's closest and most ardent worshipers, so much so that he was placed among the ranks of the angels. Take a pause from reading and think about what that entails. Satan, a fallible, sinful, weak creature made from smokeless fire, was placed in the ranks of the constant celestial worshipers of God, whose every action entailed miracles of some form or the other. We know that a vision of God or even hearing God's voice in a dream is often sufficient to completely transform a person. Imagine, then, being placed in the ranks of the angels! Not only did he thus accumulate a deep spiritual and experiential knowledge of God, but he was there with Him. He was there in the Divine presence. That's as high up as mortal aspirations may go. It is in this context that Satan was given the command he was given- when all of his doubts about Allah were non-existent, when he had absolutely 100% reason to trust in God's judgment and wisdom, when he had the deepest understanding of who God is and what His nature is. At this point, he had seen all the evidences, there wasn't to be any confusion on his part when such a command was given. At most he may have been taken aback by the command, or paused at its supposed incredulity, but his knowledge and "faith" did by no means warrant a complete rejection of the command. This command, then, is no more unfair than God's command to Abraham (peace be on him) to sacrifice his son, only that it was one hundred times more justified in the case of Satan. Abraham never saw God- he only spoke to him. Abraham wasn't placed in the ranks of angels. He wasn't in God's presence when this command came. All of this and more was done in the case of Satan. He had absolutely no excuse to think a command- any command- from God was unfair.
All of this discussion is moot however, because we clearly know from the Qur'an that Satan wasn't punished because of sincerely thinking the command was unfair, but rather because of his hidden kufr and arrogance.
Finally, and very importantly, note that Satan didn't become Satan chiefly because he refused to do one sajdah, but because how he acted afterwards. Adam disobeyed God as well, but when he realized his mistake- he repented to God and sincerely felt remorse. Satan's reaction on the other hand was the complete opposite. His immediate request to God after this was for long life, so he could mislead people and create evil. Afterwards, he proceeded to blame God for his own condition, and committed to a life of the most heinous sort of evil imaginable- misguiding people away from their Lord. Here's the remainder of the passage from Surah Al-A'raf-
"[Allah] said, 'Descend from Paradise, for it is not for you to be arrogant therein. So get out; indeed, you are of the debased.'
[Satan] said, 'Reprieve me (i.e. give me time) until the Day they are resurrected.'
[Allah] said, 'Indeed, you are of those reprieved.'
[Satan] said, 'Because You have put me in error, I will surely sit in wait for them on Your straight path. Then I will come to them from before them and from behind them and on their right and on their left, and You will not find most of them grateful [to You].'" [7:13-17]
Read this and tell me- does this sound like the afterthought of someone who sincerely loved God? Clearly, it demonstrates that Satan had evil bottled up within him from the get go, he was only waiting for the opportunity to come out of the closet and let loose. And many people don't know this- the doors of Allah's repentance was always open to Satan after he showed rebellion. It's a basic point of theology that God accepts the repentance of whoever turns to him (except in very specific conditions, like right at the moment of death after the pangs of death has started). Were Satan to sincerely feel remorse and repent, God would forgive him. But we know as a matter of theological fact that he will not repent. He would continue on with his "evil plan" until the Day of Judgment.
This seems mind-boggling, I know. But that's just who Satan is.