It's simple maths. Let's say that in SF an average programmer makes $100k and works 50 hrs/week. If Google can spend $10k on perks and get its people to average 56 hrs/week then it's onto a winner.
In reality when you consider that Google will be buying said perks in bulk, and that people will stay even longer, it might be paying 5% more and getting 20% more work. At the end of the day Google is a corporation like any other. Just one with better PR.
Seems to be paying off. I wouldn't be at all surprised if at Google HR they have a graph of man-hours worked vs perks budget. Or velocity, in Agile terms vs perks.
In reality when you consider that Google will be buying said perks in bulk, and that people will stay even longer, it might be paying 5% more and getting 20% more work. At the end of the day Google is a corporation like any other. Just one with better PR.