Russia and Iran are historically enemies. Our aggression and isolation of Russia have driven them to ally with Iran the way we are allied with Saudi Arabia.
Iran has been aligned with Russia and the USSR before that for decades and decades. Near half a century now.
Did you know the US Army had military bases in Iran up until the late 70s?