I don't know if there are companies that do this (I'm not saying there aren't), but this does not match my ground-level understanding of how and why big tech companies are hiring. The ones I'm talking to are hiring because they are constrained on what they can build by the availability of specific kinds of engineers in their organization.
Zero is the number of companies I've talked to who have ever mentioned competition with other tech companies as a recruiting concern. I'm sure that's A Thing That Happens, particularly in executive hiring, but I don't think most companies are hoovering up developers so they can hoard them.
Hiring tens of thousands of people is a very high level strategic decision. No one on the ground-level would have any special insight into it. The people on the Android team probably didn't know why Eric Schmidt authorized hiring a bunch more employees after returning from an exciting Apple board meeting, they were just happy to hire help.
A small fraction of Google's employees are responsible for all of its revenue.
They use those profits to help ensure their longevity. One way to do that is to keep people from competing with them, so they liberally hire and attempt to acquire anyone that's a potential threat.
It's not the only reason they hire so many people. Wall Street rewards headcount and tech companies have such great profit margins that it actually makes a lot of sense. What else are they going to do with all those profits?
It can also be a decision that's made from the bottom up. At any large company, as long as there's growth and success, every development team is going to either have more work than they can handle or can think of something they could do if they had more devs. So they're going to ask for more headcount. (Or cynically, some managers view headcount as a metric of their personal career progression and will ask for more headcount regardless.) You don't usually see senior management say, "let's hire 40,000 engineers". Instead, you have maybe 8,000 line managers all saying, "I want five more engineers". If anything, they are all saying, "I want six more engineers" and senior management has to figure out how to cut that down from 48,000 to 40,000.
OK, so what if 20% of Google's engineers generate 80% of the value? As long as either the other 20% of the value breaks even with the cost of the other 80% of engineers, or there's potential for explosive growth somewhere in the 80% of work that's being done outside of the core business, it's a smart decision. Google's not going to stop Microsoft from hiring enough engineers to make Bing just as good of a search engine. And if that's all they wanted to do, they could just go on LinkedIn and offer to double the salary of everyone in the Bing division and it would still cost less.
I didn't mean to single out a particular specialty, only to call out that there are different kinds of developers, and companies can get constrained on one kind or another.
I was working at Microsoft shortly after 9/11 and one of their main goals was hoovering up talent let go by other companies. Ballmer (or maybe it was the head of HR can't remember her name) mentioned the strategy in a company-wide email.
The largesse worried existing softies so much that someone created the "Mini MSFT" movement, culminating in the blog: http://minimsft.blogspot.com/
Zero is the number of companies I've talked to who have ever mentioned competition with other tech companies as a recruiting concern. I'm sure that's A Thing That Happens, particularly in executive hiring, but I don't think most companies are hoovering up developers so they can hoard them.