The cynical assumption would be that they're just sitting on the extremely vast hoards of money and greedy for more. The (slightly) less cynical assumption is that their interest in Search nowadays is as a piggy bank for projects they consider more important.
Worth noting though the latter has long been the going assumption internally at Google: Search was the cash cow that funded Google's expeditions in finding the Next Big Thing. This plan has been complicated by the appearance that Google seems to not be terribly good at the kind of product execution that would lead them to the Next Big Thing.
The technology that one would get in an open source situation isn't very usable outside of Google's ecosystem because Google builds software on top of Google's stack. Like, without the monitoring infrastructure they've built or the Borg scaling infrastructure, their software is actually kind of fragile because the ethos is " If it starts to malfunction break it quickly so it can cause a monitoring event and to get replaced by auto restart."
The Google way of doing things is actually not a great way to architect most software that isn't running on a giant data center structure.
My two cents is that Google has been consumed by its performance review process; the amount of money made by advancing dwarfed the amount of money made by making advancements, and as always the metric was the outcome.
Advancement and fulfilling of personal ambitions is a common thing in basically every sufficiently large company. Google isn't unique in having that problem - nor is their promotion process markedly different than everyone else's!
What is different is that Google is extremely metrics and OKR driven, combined with a near-total absence of product leadership. There is often no broader product strategy besides "grow X by Y".
This results in a critical weakness where you can get promoted for shipping Obviously Dumb Shit, because it hits some ill-defined OKR. It's practically an annual tradition within Google's management: creatively interpret pointless and vague OKRs so that you can make a (contorted) argument that Projects X and Y contribute to it, so you can ship it and get everyone involved their promos.
People in other companies are ambitious and want to get promoted too! The difference is that in many other companies there are other sanity checks in place that you don't get promo'ed for shipping Obviously Dumb Shit.
Google's root problem IMO is that there is an extreme lack of product leadership and product vision at the very top levels of the company. This results in a near-total inability to mitigate meta-hacks of internal promotion systems.
At companies with more product strategy at some point someone at a high level goes "Projects X makes no damned sense!" and puts the kibosh on it. At Google Project X will ship, and then after its badness becomes inescapable, get shut down.
It's probably worth mentioning that hypothetically, One could take the source code and port it to third party libraries and kubernetes. But I can't help but think that that would be about as much work as clean rooming it from scratch based on a feature description.