Brutal torture of dissidents and consolidation of wealth played a role for most revolutionary groups, but at the onset of the revolution in 1979 most groups were not looking for a theocracy.
The Tudeh and Fedaian were more important in finishing off the government than theocracy supporters, and even the powerful People's Mujahedin (which was Islamist) did not want a theocracy.
'Most groups' doesn't mean most people. 99.5% of people voted to make Iran an Islamic republic.
This is really simplifying a complex thing, but I would not make the claim that Tudeh was more important than theocratic supporters and even still, they supported the creation of an Islamic republic and supported Khomeini.
Yes, the MEK was Islamist, but like the other two you mentioned, they were also Marxist. They were directly opposed to the Ayatollah because he usurped their power with the poor and promoted what they saw as a bourgeoisie agenda, securing property rights and free enterprise.
The Tudeh and Fedaian were more important in finishing off the government than theocracy supporters, and even the powerful People's Mujahedin (which was Islamist) did not want a theocracy.
See: https://en.wikipedia.org/wiki/Iranian_Revolution#Opposition_...