Often series of events that involves major injustices lead to things like revolution or a rise of a man like Hitler.
It is important to know what events caused the Iranian society to rise up against Shah and his western supporters.
In WW1 Iran was occupied in an aggressive move by the British and the soviet, which lead to the genocide or ”Persian famine of 1917–1919” instated by the British which resulted in the death of several million Iranians! Have in mind, this famine could have been easily avoided if it was not systematically planned.
In WW2, Iran was again occupied for nothing more than pure aggression and its leader at the time Reza shah was removed by force and his son who was loyal to the west was installed. 10 years after that, CIA again largely intervened in Iranian domestic affairs and thus their natural sociable evolution to nationalize their oil industry by organizing a coup to topple the leader of that movement. After that coup, people had become very frustrated and painfully helpless. They were quite ready for an uprising as they still had a fresh memory of western interference and Shah loyalty to them.
One of other reason why people wanted an anti-west leader was the fact that west had betrayed Reza Shah during the WW1 in the most despicable manner, which showed to people even if you be friend with the west, they are still going to stab you, not in the back but right on your stomach as you are watching.
All this bad consciousness in the society resulted in the Islamic revolution in which a man like Khomeini said all the things that were in people’s hearts and more important than anything promised to bring self-determination.