By Dan Gallagher

Spending money to make money is a long established game in the cloud. Oracle's deal with TikTok takes that to a whole new level.

Much remains unclear about the arrangement -- including whether it will ultimately pass muster with both the U.S. and Chinese governments. But Oracle's prime motivation to gain a high-profile customer for its cloud business was crystal clear in its announcement over the weekend about becoming TikTok's "secure cloud technology provider."

The second sentence of that statement referred to TikTok's choice as a "technical decision" heavily influenced by Oracle's cloud deal with Zoom Video Communications struck back in April.

But unlike Zoom, the TikTok deal has a sizable financial commitment -- in the form of Oracle taking a 12.5% stake in a business reportedly valued at $60 billion. That would amount to a $7.5 billion investment. Oracle's three largest acquisitions to date have equity values ranging between $8 billion and $8.8 billion, according to FactSet.

Is it worth it? Cloud companies typically spend big up front to secure deals that pay off over time, and less established players sometimes offer cut-rate pricing to land marquee names that can help validate their services. Given its long, established record in the software industry, Oracle typically hasn't had to play that game.

The company's sales and marketing expenditures have averaged about 21% of revenue over the last five fiscal years. By contrast, the 50 largest cloud-software providers spent an average of 44% of their revenue on sales and marketing over the last 12 months, according to S&P Global Market Intelligence.

But Oracle is also racing to catch up to Amazon, Microsoft and Google in the cloud. Mark Moerdler of Bernstein wrote that the Zoom deal could raise Oracle's "perceived relevance" in the cloud category. Zoom was already a major Amazon customer, but it now competes directly with rival videoconferencing services from Microsoft and Google, making them less desirable partners.

TikTok might have many nontechnical considerations as well. Its ultimate fate in the U.S. rests squarely on winning the favor of President Trump, who is close to Oracle Chief Executive Larry Ellison. The Wall Street Journal reported Monday that Mr. Ellison spent the weekend on the phone with the president to sell the deal.

If the deal is approved, TikTok's potential contribution to Oracle's cloud business is also a big question mark. The parent of rival social network Snapchat pays $400 million a year to Google and will pay another $215 million to Amazon this year for cloud services. That is to serve a base totaling 238 million daily active users as of three months ago.

TikTok's current base of U.S. users is less than half that at 100 million. Keith Weiss of Morgan Stanley estimates that TikTok's contribution to Oracle's cloud revenue could range between $130 million to almost $1 billion a year. Oracle's cloud service and license-support revenue for the fiscal year ended in May totaled $27.4 billion.

Ultimately, winning a cloud deal with TikTok seems more of a political success story than a business one. That could still help Oracle, in showing the latecomer to the cloud has serious political muscles it can flex. But political winds shift rapidly these days, especially for big tech companies. The especially messy TikTok story doesn't make for the cleanest victories for anyone involved.

Write to Dan Gallagher at dan.gallagher@wsj.com