It was pride out of love. Iblees was so devoted to Allah, that Allah saw fit for him to enter his company with the Angels. Then Allah creates this creature out of mud, who has done nothing yet, and orders Iblees to bow down to it. Iblees is offended, hurt.
It could also be said that Shaytaan thought it was a test from Allah; it's normally prohibited to bow down to others besides Allah. Obey or disobey this contradictory command?
Allah has knowledge of the seen and the unseen right? Past, present, future; no leaf falls from a tree but that Allah knows about it. And he is the Knowing Creator of all right? Did he not create Iblees knowing he would have this deficiency, pride? Did he not know and ordain that Iblees would do this? As Iblees tells Allah,
Because You have sent me astray...
So Allah was not complicit in the allowance of evil, rather the Creator of it, who must sign and approve everything before it is done!
But, it's all part of the 'Divine Plan',
It should be noted that Iblees himself never worships others besides Allah (it can be argued he worshipped himself by 'disobeying' Allah). On the Day of Judgment, Iblees will disown the idolator he led astray from monotheism,
Verily, Allah promised you a promise of truth. And I too promised you, but I betrayed you. I had no authority over you except that I called you, and you responded to me. So blame me not, but blame yourselves. I cannot help you, nor can you help me. I deny your former act in associating me as a partner with Allah.