Earlier quoted context omitted.
A lot of that stuff although is cheaper for the corporation to provide than for the employee to pay for themselves in money and time. The corp has a tax advantage and a bulk purchase advantage. Not having a payment infra probably adds a little bit of efficiency too.
Which does seem like sort of a loophole. Don't companies have to add perks over a certain amount to the employees pay so that it gets taxed? Wouldn't feeding an employee every day qualify? It would be sort of weird if we turn back into having sort of 'company towns' where your employer provides a lot of what you need except they pay for it. It's not just Google this would be beneficial for, even if you run a factory…
I expect that it's a mix of two things:
1. You can make a case that keeping them in the office (rather than making trips out) is a business need, and it might hold up to scrutiny. This probably covers things like coffee, juice, snacks, etc. The company legitimately does benefit from (some key) employees not constantly leaving the office for small necessities.
2. There's a lot of low-level tax fraud the IRS is too understaffed to deal with (and is directed away from corporate fraud like that, anyway). So you probably are supposed to report the value of the meals you get, but no one tracks it, and each employee is only committing a small error, so the IRS can't justify dealing with every case.
The IRS actually has a great PDF on when giving an employee a free meal is a taxable benefit or not. (I found it a couple years back when starting a small corp, but can't seem to find it now.)
Ed:
According to this document [1], Google providing meals probably falls under a nontaxable status because they provide them on campus and there isn't a lot of food near the campus. (Section starts on page 43.)