So Snickers is actually subsidizing the sales of the other products with their marketing, it sounds like they should adjust their pricing or add some minimum inventory levels.
It's a loss leader. Remember, the manufacturer is Mars, Inc. They'd prefer you buy the higher margined product too, because most likely they make that as well.
before someone gets up from their desk and walks down the hall, Mars is able to sell that person the idea of a 50cent Snickers. While this is not completely realistic - many times that snickers slot will be empty - it's enough to convince someone to get out of their chair, walk down the hall and 'check' the machine. At the machine, they've not only decided that they probably want something, they've begun to exert effort to achieve their goal. Upon finding the machine out of snickers, they either have to walk back disappointed (and now maybe slightly hungry, by suggestion) or they can get some other similarly priced snack to fulfill the need they created for themselves.
If, instead, at the beginning of the decision tree it was a 75cent guaranteed snickers bar then it would be a simple, rational decision - do i want to pay 75cents for this? The argument the marketing department makes is that there are are fewer people who rationally want that 75cent snickers bar vs. the people who can be sold on the dream of a 50cent snickers bar (that strangely looks and tastes more like a high-margin cookie).
And then there are people like me, who are hungry and desperate for real food (not milk chocolate and corn syrup) who pass by a vending machine, despair at every single product on offer, and just drink some water.
Happy that I live somewhere where "fast food" includes very very healthy options (like made-that-day rice balls with red beans).