Saddam's regime is a socialist regime, with long connection to Russia since the days of the Soviet Union.
Russia cannot refuse another source of abundant oil in Iraq, which is pretty cheap to extract unlike Russian oil. Luk Oil of Russia had a multibillion dollar oil contract with Saddam's regime.
Middle East has always been where Russians/Soviets would love to bleed America using their proxies, hoping to cutting down American power. It is still the same game even if the Russia is far weaker than the Soviet Union.
Apparently Putin gambled that Russia can take cheap oil and bring down the lone superpower by a few notches. This really disappoints me as well. Russians have been overplaying their hands, encouraged by anti-American Franco-German axis.
Now Russia's gamble failed.