They come in handy when it’s late and/or the shop/cafe/buffet is closed, and you’re peckish!
We used to have a Cadbury chocolate vending machine at school going back around 16 years. It was completely random and would dispense 4 chocolate bars in one go! Other times it would give you something different to what you had chosen. It got removed after about two years. It wasn’t a wire one and you couldn’t see inside the machine so no idea what was going on in there!
Yeah, we had a vending machine at school that was hopeless - you'd randomly get anything between about zero and five bars out of it. If stuff got stuck, people would buy the item above in an attempt to dislodge it, but this frequently resulted in huge clusters of bars building up!
After a while, it rarely worked at all and got carted away.
When I was in the sixth form, we had a hot drinks machine. The products were quite evil but I was quite fond of the "chicken" soup (not sure it actually contained chicken). Drinks were 15p each, but the machine only accepted the older large size 5p coins, and the smaller ones were getting quite common by then. Large 5p coins were soon changing hands for 10p!
The machine disappeared one day. We only found out later this was due to a large colony of mice having taken up residence inside. Best not to think too hard about what we'd been drinking...