Russia is currently consorting with Turkey and Iran, two ancient enemies, in order to maintain a position of power in the Middle East. This region has long been fought over and occupied by Turks and Iranians and it is a major achievement for Russia, which lost its own empire in 1991, to take on the former (until 1918 ) Ottoman Empire and the former (until the Ottomans and Mongols showed up several times) Persian Empire. A century ago the growing economic importance of oil began changing the Middle Eastern political landscape. The Ottoman’s lost access to oil and the Iranians got a minority share of it. Most of the oil was now owned by Arabs, former subjects of the Ottoman’s and Persians. To defend their new wealth the Arabs made alliances with their biggest customers, the new superpowers in Europe, the United States and now China. Despite all that Russia, Turkey and Iran still want to play empire builder. This led to the three former foes becoming allies. It has been an unstable and unpredictable partnership but Russia still sees itself as the key player. Turkey and Iran quietly oppose these Russian plans.
It won't last. What Russia will do to maintain power in the Middle East when it can't ride along with Turkey and Iran is unclear to me. Why Russia thinks it needs to spend resources on Syria to maintain a position in the Middle East is beyond me. Perhaps it requires a grasp of nuance that I freely admit I lack.
Memories of the Potemkin glories of Soviet power push Putin on, I think. As I said when Russia directly intervened in Syria, have fun storming the castle.
And Russia is still paying for their pointless Syrian bases.