This is the problem : invention, in the software space consists of all three of a) a clever idea b) implemented and used by the market c) purchased by the market so it makes, or supports making profit (or an exit).
It's really hard to know where a) is going to come from, hard to get b) to happen, and c) depends on so many factors unrelated to a) and b) sales, macro market issues.
Especially as there's no formula for creating good ideas, unlike there are formulas for b) (e.g agile) and c) P&L, it's 'understandable' that business owners (Ms. Mayer) looks at the contributions of a), over time, and sees expense, and nothing brought to the company.
I speak from experience, having mananaged a 'fully funded by DARPA' team which was part of a public company. Because DARPA set the 'academic ish' problem criteria, and few of a) were transferred, and the research group didn't make *profit* the research team was sold off.
Funding labs takes both high level sponsorship at a company as well as a company that takes the long view, AND has revenue to support. You all know who those are. Many many decades ago, that was Bell Labs. Now it's Google etc.
This cut is isn't unexpected, and I'm surprised it took Ms. Mayer this long.