I post this from an analytical prospective only.
Factors to consider.
Russia's Muslims are Sunni Muslims. With Iran being Shia Russia can do business with them without fear of them able to exert any control over their native Muslims.
Iran practically borders Russia - sharing the border with Russian ally Armenia for example.
Iran's native Christian population are heavily Orthodox Christians and look to Russia for protection. With Russia embracing her Orthodox religion again after the fall of Communism this is a factor too often overlooked.
Iran is a counter balance to the USA in the region which has as allies NATO Turkey, an unstable nuclear Pakistan and an American dominated Iraq and Afghanistan - all of which Iran borders.
Lastly, it keeps the USA on edge as the USA tries to do with Russia in say countries like Georgia.
This is the reality of realpolitiks.
Yep Russia trying to be relevant again