For years, Microsoft (MSFT -0.45%) and Sony (SONY -1.84%) have been locked in the biggest rivalry in gaming. Generation after generation, their Xbox and PlayStation consoles have been duking it out to win over millions of consumers around the world.

So when the two companies announced a gaming partnership last month, it took everyone by surprise -- including Sony's own PlayStation team, according to a Bloomberg report. With so much history between these two rivals, it's fair to ask what prompted the sudden collaboration and what it really means. Let's explore the why's of this deal and what it might mean for the future of gaming.

A man plays video games

Image source: Getty Images.

The big threat to consoles

Before we get into the nuts and bolts of the partnership, investors must understand the major shift under way in video games right now. For as long as home consoles have existed, video game fans have consumed games primarily by buying their own physical copies of each title. Recent years have seen the rise of digital distribution, but those are still individual purchases. The games, be they discs or online downloads, live locally (that's "local" in computer parlance -- on the machine, rather than on the internet).

But now, some major companies -- including those without much of a history in this industry -- are making a push into cloud gaming. In contrast to the traditional model, cloud gaming puts the games on cloud servers, and users access them over the internet.

That means subscription services like NVIDIA's GeForce Now are looking to the future and vying to do to video games what Netflix did to television. (AMZN -0.68%) is also reportedly working on cloud gaming solutions, while Alphabet (GOOGL -1.21%) (GOOG -1.30%) has already announced its cloud gaming platform: Stadia.

Cloud gaming is a threat to the console giants, but it could also be a massive opportunity. Both Microsoft and Sony have cloud gaming services of their own (Xbox Game Pass and PlayStation Now, respectively, plus Microsoft also has a new cloud gaming project called xCloud in the works). The issue from the perspective of these companies isn't that individual games will be replaced by subscription services -- it's that, unlike in the console market, Sony and Microsoft are not the favorites to dominate the cloud gaming arms race.

What is this partnership all about?

While both console makers have reasons to be uneasy about their status in a cloud gaming future, Sony arguably has more cause for concern. Unlike Microsoft, Sony doesn't dominate the PC gaming market. On top of that, Sony's PlayStation Now cloud-gaming subscription service is much less robust, as of this writing, than several of its competitors.

Expanding PlayStation Now wasn't necessarily going to be easy for Sony, which does not have a big-time cloud server operation like its new rivals. To get that server space and scale up, Sony needed to find a partner. Its major options were its two new gaming rivals -- Amazon and Google -- or an older one, Microsoft.

Of the three, Microsoft had the best reason to make a deal. Now that it's facing huge new rivals armed with plenty of cloud computing muscle, Microsoft wants to make sure it keeps as much of its gaming-industry inside track as possible. To do that, Microsoft plans to work on newer and better cloud gaming technologies -- with Sony.

According to the somewhat vague language of the partnership announcement, this means that Microsoft and PlayStation will "explore joint development of future cloud solutions in Microsoft Azure to support their respective game and content-streaming services."

What's next for Sony and Microsoft?

Virtually nobody saw this deal coming, but as the shock wears off for gamers and investors, the logic is clear: Sony needs server space, and Microsoft is willing to collaborate to make sure that Amazon and Alphabet don't get a jump-start on cloud gaming that turns both console giants into gaming dinosaurs.

There are limits to this deal, of course. Don't expect a collaborative video game console from Sony and Microsoft any time soon. And do expect that the next generation of consoles will feature a typical PlayStation-Xbox fight for supremacy. This doesn't end the Sony-Microsoft rivalry, but it does show that the rivals are willing to cooperate in an effort to keep the rivalry a two-company affair.