Weird and wacky perks have long been a feature of the Silicon Valley high-tech scene, and now that there's a critical mass of tech startups in New York, the New York Times is starting to take semi-mocking notice:
For those immune to the temptations of a Michael Phelps-style caloric regimen, other distractions are available. Spotify hands out free concert tickets and treats employees to performances from artists like Sheryl Crow, while Chartbeat workers play with office puppies in the puppytorium (also known as the back room). Birchbox employees can sign up to get manicures and haircuts in the office.
Allowing for the fact that there's always some silliness and terrible decision-making in business, I think there are real reasons for companies to function this way. Talented employees are valuable, and firms need to recruit them. You could simply recruit them with higher and higher salaries, but people value non-salary things like autonomy. But even though employees want to be part of a flexible workplace, there are actually some real gains to having people be in the office. So you want to combine a policy of formal flexibility ("[u]nlimited vacation, which most of the start-ups in this article offer, also provides a clear opportunity to overindulge") combined with heavy investment in the idea of luring workers out of their pajamas and into the workplace.
This also helps with an asymmetrical information problem. As a boss, you really want to hire people who have a workaholic disposition. But in practice it's hard to have a "workaholics only" hiring policy. But if you load your compensation structure heavily with things like in-office perks that are mostly beneficial to workaholics, then the selection process is done for you.
A related issue is that these perks can't be saved. If you offer skimpy perks and enormous salaries, the risk is that employees will curtail consumption, save a bunch of money, and quit. But you can't stockpile the puppies in the puppytorium and enjoy them later. You have to keep working.
Last but by no means least is taxes. Computer programmers earn more money than average people, and California and New York charge higher tax rates than most states. That creates a financial incentive to shift the marginal dollar away from taxable spending to non-taxable benefits. The boring way to do this is to provide a really gold-plated health insurance package. But if the demographic profile of your workforce skews overwhelmingly to young unmarried men, this is going to be relatively unappealing. Instead of a nice family health care plan for your wife and kids, you get a dorm-style package of food and entertainment to help smooth the transition into adulthood.