If IBM's (IBM - Get Report)  $34 billion deal to buy Red Hat (RHT) feels a little desperate, that's because in some ways, it probably is.

That doesn't necessarily make it a bad move, however. As the old saying goes, desperate times call for desperate measures. And while the deal isn't cheap and comes with risks related to execution, cultural differences and competition, on the surface it's a good strategic fit for a struggling Big Blue.

Wall Street's Sticker Shock

IBM's stock is down 4.2% on Monday as of the time of this article, but that likely has more to do with worries about a broader market selloff and how much IBM is paying for Red Hat, than concerns about Red Hat's strategic value. At an enterprise value (market cap minus net cash) of $34 billion, or $190 per share, the deal price is equal to 7.7 times Red Hat's fiscal 2020 (ends in Feb. 2020) billings consensus estimate, and about 30 times a fiscal 2020 free cash flow (FCF) consensus of $1.12 billion.

Moreover, with IBM planning to pay for the deal solely with cash, there are worries about its impact on the company's net debt balance, which (excluding debt held by IBM's financing arm) totaled a modest $1.9 billion at the end of Q3. IBM says it plans to suspend its stock buyback program in 2020 and 2021 because of the deal, albeit while promising to support "a solid and growing dividend" going forward.

What Red Hat Brings to the Table

In return for $34 billion in cash, IBM gets the world's biggest provider of open-source enterprise software solutions, and does so at a time when enterprise spending on open-source offerings is expected to continue growing at a healthy clip for a long time.

Red Hat's bread-and-butter Linux business should continue delivering moderate growth as Linux -- often used to handle workloads in growing fields such as AI, analytics and high-performance computing (HPC), as well as to run cloud apps -- keeps taking server OS share. And though the majority of Red Hat's Linux revenue still appears to come from traditional on-premise enterprise environments, it's also now doing a healthy amount of business selling Linux subscriptions that are used on public cloud platforms such as Amazon Web Services (AWS), Microsoft Azure and the Google Cloud Platform (GCP).

In addition, Red Hat now gets over a quarter of its subscription revenue from non-Linux open-source offerings. These include middleware solutions that help connect software and services, as well as newer platforms such as OpenStack (cloud infrastructure software), OpenShift (a platform for managing large deployments of app containers), Ansible (software for automating operational data center tasks) and Ceph and Gluster (storage software platforms).

Subscription revenue for these offerings collectively rose 31% during Red Hat's August quarter. While the middleware portion of this business isn't growing fast, other parts are seeing rapid growth as trends such as automation investments, cloud container deployments, and the adoption of OpenStack by enterprises and telcos for private and hybrid cloud deployments give Red Hat's sales a boost.

Provided it remains in place, Red Hat's management is also a valuable asset for IBM. The company has done a pretty good job in recent years of using both organic investments and M&A to expand its open-source footprint, and of not getting caught flat-footed by public cloud adoption. I've interviewed Red Hat CEO Jim Whitehurst twice, and have generally been impressed with his technical acumen and big-picture thinking.

Opportunities

A look at recent IBM earnings reports makes it easy to understand why the company would be willing to pull the trigger on a transformative software acquisition with a price equal to about 30% of IBM's current market cap.

Though global enterprise software spending is believed to be growing at a high-single digit clip, IBM's Cognitive Solutions segment, which accounts for much of its software revenue, saw revenue drop 6% in Q3. And though IBM promises Cognitive Solutions' performance will improve as the company works to "modernize" offerings in fields such as collaboration, talent and commerce software, CFO Jim Kavanaugh declined on the Q3 earnings call to forecast the segment would hit a long-term target for mid-single digit revenue growth in 2019.

IBM, which has already been partnering with Red Hat for years, could leverage its giant salesforce and services units to help cross-sell and deploy Red Hat's software. With Red Hat currently getting less than a quarter of its bookings via its direct salesforce, and with over half of its bookings still coming from the Americas, the value of IBM's global enterprise footprint can't be overlooked.

In addition, with Red Hat having long touted the ability of platforms such as OpenStack and OpenShift to support hybrid clouds and/or keep businesses from getting "locked in" to a single cloud platform's services, both Whitehurst and IBM CEO Ginni Rometty seem eager to talk up the combined company's ability to offer a more comprehensive set of software and services for hybrid cloud and multi-cloud deployments.

"Now, as our clients think about this transition to hybrid and multi-cloud, Red Hat's strategic value has only increased," said Rometty on a Monday conference call. IBM, whose cloud infrastructure business has struggled in its fight against the market's Big Three, is just a couple weeks removed from launching a software solution for managing app deployments across multiple cloud environments.

Risks

For all of the value that Red Hat brings to the table, it's fair to wonder (given the company's performance in recent years) how well IBM will manage the integration of Red Hat's operations post-acquisition, and whether Red Hat will keep executing the way it has in recent years.

Cultural differences could be an issue here. Red Hat has long prided itself on having a culture of openness and transparency, one in which hierarchies and org charts matter a little less than they might elsewhere. If this culture erodes post-acquisition, major talent departures could soon follow.

In addition to Red Hat employees, IBM needs to keep Red Hat's giant base of open-source developers on its side. If IBM alienates these developers, they could start devoting more of their attention to the many open-source platforms and software distributions that compete against Red Hat's.

Last but not least, IBM needs to keep Red Hat's offerings competitive with the rival software and services that Amazon.com (AMZN - Get Report) , Microsoft (MSFT - Get Report) and Alphabet/Google (GOOGL - Get Report) are rolling out for their respective cloud platforms. Examples include container management services that compete against OpenShift, and the home-grown Linux distribution that Amazon provides for free to AWS clients. While Red Hat's ability to prevent vendor lock-in can be a valuable selling point in this fight, it won't always win the day if a company finds the "proprietary" offerings of a cloud provider to be much cheaper and/or more feature-rich.

Given the risks, as well as the price being paid, it's by no means a given that the Red Hat acquisition will pay off for IBM. Nonetheless, considering what Red Hat can deliver, and where IBM's software business stands today, it's hard to blame Big Blue for swinging for the fences.

Amazon.com, Microsoft and Alphabet are holdings in Jim Cramer's Action Alerts PLUS member club. Want to be alerted before Jim Cramer buys or sells AAPL or GOOGL? Learn more now.