I do agree that there are a lot of silly startups these days, but it doesn't mean that there isn't also a shortage of quality hackers.
The thing that seems (in my experience) to drive engineering loyalty the most is making it known to the coders that their opinions are valued by the non-engineers, and that the engineers can drive actual product change (as long as they can prove their ideas legitimate.)
Hiring blindingly smart people and then telling them to stop thinking about the aspects of the business that don't involve writing code is short-sighted and demoralizing to the staff.
However, soda, coffee and toilet paper and soap in the bathroom are very small things. Listing them in an ad as one of the key benefits of working for a company is also a mine canary, one that says the company has very little to brag about.
They are not exactly putting on the table things that good engineers do not have at their current job. Also, perks like "free soda" only attract the young and inexperienced.
And is it really news that many companies are poorly run by clueless douchebags with MBAs? Surely this is just as true at larger companies as it is with startups. Larger companies are just better at covering it up.