This probably the most often forgotten argument in favor of freebie snacks: time/attention saving.
A good engineer can easily cost a company $1/minute (and be worth much more). Even if going out to ones car to grab some change takes 2 minutes, that $.50 soda just got a 400% markup. Actually having otherwise productive employees think about this as an issue is an even greater waste of talent.
In a large enough company, though, the ratio of dead weight to productive people, can be high enough that charging for soda isn't a false economy.