Global Islamic Terrorism is universally recognized as today's big threat and has been the justification for all sorts of changes, especially to life in the West after 9/11. The Islamic terrorists whom we are supposed to fear on a daily basis more or less believe in some form of Wahhabism, which grew up in and is spread from Saudi Arabia. Surprisingly the US and the Saudis have been and still are staunch allies.
This makes little sense on the surface but Saudi exceptionalism extends to Russia as well. Russia and former parts of its territory have been some of the biggest victims of Wahhabism and still fight it to this day and yet President Putin just vowed to protect them from air threats via Russia's top of the line equipment. So this raises the question by what logic would Russia want work with the Saudis who prop up the ideas that murder their citizens? The short answer is Multipolarity.
During the Cold War we saw two great powers with massive spheres of influence dividing the planet between themselves. This Bipolar (in the literal sense) structure forced everyone on America's side to be Capitalist / Western-style Democratic and everyone on the USSR's side to be Communist. So for every Communist revolution that succeeded Moscow's sphere of influence grew while Washington's shrank.
Now in the 21st century this dynamic is much different as the sole Hyperpower is fighting against any upstarts who challenge its status, which means that every nation that succumbs to the Washington status quo is a victory for Monopolarity, while any nation that begins to act on its own or under the influence of anyone besides the US/NATO/The West is a victory for Multipolarity.
This is why today, unlike during the Cold War Russia has a policy of being open to working with anyone who is willing to work with them regardless of ideology. Of course during the Cold War the US and the Soviet Union would work with countries outside their political theory of preference to some degree, but now Russia is free from the burdens of Communist ideology and is thus free to associate with anyone and Moscow is willing to work with anyone because any nation that rises up to a high level of sovereignty creates another crack in the monolith of Monopolarity.
This is why Moscow has been cooperating with Turkey who at times has been very aggressive towards them, shooting down a Russian plane, forcing their way into Syria and working against Assad's and Russia's interests in the region, and opening Turkish Universities across parts of the Former USSR challenging Russian cultural influence. These all sound bad, but Moscow has a bigger fish to fry and the upstart Turks, despite being in NATO are beginning to push for a more powerful sovereign pro-Turkish foreign policy, which is bad for Russia in doses, but on the whole is a huge stride towards a Multipolar World that Russia so desperately needs.
And this is the logic that applies to the Saudis. True the Saudi Wahhabism and loud inaction in terms of containing Wahhabism have lead to the deaths of many Russian-speaking people the world over, but the Multipolar mission takes precedence, thus Putin offered the Saudis to buy Russian S-400 systems because "Our (Russian) air defenses can protect you, like they do Turkey and Iran" and that "These kinds of systems are capable of defending any kind of infrastructure in Saudi Arabia from any kind of attack."
Syria and Turkey are both major Multipolar victories so perhaps in Putin's words there is a hint that Saudi Arabia could jump on the Other World Order's boat by buying these defense systems. The S-400s in question could be used to defend against a local neighbor, but we could suppose that a massive surface-to-air set up would best be used to defend against NATO, who is the only serious missile launching threat.
To an extent it is very possible that this offer by President Putin to the parties indirectly responsible for a great deal of suffering in Russia could actually be an invitation to the Multipolar World.
Saudi Arabia has been very much the exceptional Arab nation in the Middle East when it comes to NATO's actions, but nothing lasts forever. The Saudis have oil and little means to defend it, while at the same time maintaining an ideology that has been demonized by the Mainstream Media for almost 20 years, prepping the West with a casus belli when the time comes. The fear of Monopolar aggression could force the Saudis to buy into team Multipolarity.