OPINION:
Maybe Russia finds Iran useful (in a way(s) not known to me).
Probably because Iran is a thorn in our side.
Iran is different. It is Shia.
Al Qaeda will attack ANYONE, even fellow terrorists. They got into a massive firefight with Hamas in the West Bank. They even got into battles with Hezbollah in Lebanon, and with other terrorist orgs in Iraq and Afghanistan. Al Qaeda attacks Chinese, Russians, Kazakhs, Iranians, Saudis, Palestinians, Hezbollah, and even opposition Taliban commanders.