But Yahoo is competing for Silicon Valley software engineers, and perks are very common, so if you don't have free food, free snacks, office parties, events, and other benefits, you'll have to pay your employees a lot more.
Perks are incredibly cheap for the company, because people value them much more than they would the corresponding pay raise.
So if you don't understand this, it looks bad that company "wastes" millions on perks, because you don't see the many more millions it saves on salary.