The Village at San Antonio is not North Bayshore. This wouldn't work at Google's current campus because there are
literally not enough restaurants to feed everyone - there were 4 when I worked there (Sports Page + the Sunnybowl/Falafel/Sushi complex), and since then Sports Page has closed and there are apparently a few new ones by the Computer History Museum. Perhaps the new zoning plans for North Bayshore include more, but it'll be years before that's done.
But when The Village was zoned, it was explicitly done with street-level retail for a wide variety of restaurants. There are over a dozen restaurants within a 5-minute walk of Facebook's offices, plus a Walmart, Safeway, Whole Foods, and produce market, all of which have ready-to-eat meals.
Something that's left out of a lot of the news coverage of this: it's not a law but a development condition attached to the particular property that Facebook is occupying. When a real-estate developer wants to develop a piece of property, there's a complex negotiation with the local municipality (or county, if it's in unincorporated land) that includes things like contracting for water/sewer/garbage services, how to ensure there's adequate police & fire coverage, how the town will build new roads to handle traffic generated from the property, what's the impact on schools & community services, and what types of dwellings & permitted uses are available for the property (you can't build a skyscraper in the path of SJC airport, for example, nor can you build a chip fab on residential land). Written into that contract is the cafeteria clause under discussion here. While I have some doubts about whether this is a good thing (I've got another comment here where I expressed mixed feelings), it's a contract and not a law, and obviously Facebook has felt that the restriction is not too onerous for the building to be worth occupying.