Since we are talking about evil and it's origins, do you feel that God had intended iblis to not bow to adam? And did evil exist before happening of that event? And if god did intend him to not bow, why did he let it happen?
I believe that God set it all up knowing what was going to happen, as a way of bringing out Satan’s arrogance and showing His own greatness.
Satan had free will and was not forced to act the way he did. But God knew of his latent arrogance and pride, and knew that setting up that scene would bring it out. God does this to humans as well, a person who sins in private, for example, will suffer situations in public life that disgrace them and make people dislike them, as Ibn al-Jawzi points out many times. Humans have free will, but God can always set up situations where their true nature shows through.
We do not know what existed before that event. It is possible that there are billions of other universes, each with its own story and history, and that our universe and its story may be nothing more than a drop in the ocean of all existence.
Adam, peace be upon him, also had free will, and was given some knowledge by God. But God placed him in a situation where he could be tricked by Satan and did not prevent this from happening. Why? Because God wanted a story in which His qualities would show, and in which He would gain millions of true friends, friends who are tested and tempted all their lives yet continue to be sincere and devout toward Him.
If you think about it, there is no other way for God to have true friends. A true friend is the one who is not forced to believe in Him or obey Him, but that despite this, of his own choice, he seeks Him, loves Him and obeys Him until he dies, and with this he earns eternal closeness to Him as a true and proven friend.
We can wonder whether the way God set up everything was fair and just. But the truth is that we do not have sufficient knowledge to make a judgment in this regard, God is infinitely wiser and more knowledgeable about us and about everything else than we are. What matters is that the end result of this universe is the creation of millions or billions of pious, kind and good people who love God and want to be with Him, and who prove their sincerity throughout their lifetimes. The creation of these humans, in my opinion, is more than sufficient justification for everything that happened at the beginning of the human story.