The benefits must be provided for a business reason to not be taxed (to the employee as income).
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.)
[1] https://www.irs.gov/pub/irs-pdf/p5137.pdf