My hunch is that these companies are cargo-culting their strategies. The hiring freeze is as essentially a gut reaction. If one starts with layoffs, others will follow. The real problem is that companies of the Google scale will always need new engineers for particular projects and have a surplus for others. A global freeze or even layoffs simply don't fit.
When there are hiring freezes and layoffs, it's easy to find good cheap engineers and you hire. When job markets are hot, you put a pause on hiring.
The same goes for many other things. A recession is an ideal time for deep R&D. There's little competition, and it's possible to do long-term thinking. When the recession ends, and the bubble begins, you hit jackpot.
All of this requires deep enough pockets to weather a few years, though, and patient investors. That's rare.
Cargo culting for Google and Facebook make little sense organization-wide, since they do have deep pockets. They make complete sense employee-wise. No one got fired for following industry best practices, conventions, or cycles.