Google is a search engine + search engine monetisation engine. They have some third parties participating in the ad market (notably other search engines) and some non-search properties (eg YouTube) that contribute some as revenue but search+AdWords is still the core.
Meanwhile, most of the notable things google do are in unrelated or marginally related to the business model. Android, chrome, self driving cars...
It's as if most of the company has nothing to do with the business. They used to explain this with a VC metaphor, but that seems to be gone.
FB & twitter are even stranger. Why do they have 100X more employees and costs than they had a few years ago, while not apparently outputting much more than they were outputting before. They're still "just" social media sites. With all due respect to ad-tech and content ranking algorithms...
The common denominator is a revenue stream that comes from dominating a niche and very little relationship between what the company invests in and how it makes money. They didn't/couldn't have actually directed themselves towards those things as goals.
Oracle is similar. They're deeply embedded in their customer's businesses. That means a captive market. This generates a revenue stream. There's no predictable way of turning that revenue into a cloud service, no matter how much they're willing to spend.
Ultimately, the problem is that the market as a whole is overfunded. Investors don't want dividends, so they get highly speculative/dubious investments instead.