Sims can purchase items for a small cost and most of the time their purchase will be delivered with no issues. Every once in awhile, an item will get stuck in the machine. Your sim has the option to accept their losses or try and retrieve the item. If you choose to retrieve the item, your sims will shake the machine and either get the item or end up with nothing. Each outcome has a different mood impact on your sim.
In addition to stuck items, the vending machines will eventually break (although not as quickly as most EA electronics) and can be repaired by your sim or through a hired service.
But have no fear, these bad boys come with upgrade options to prevent these! There is a third upgrade option to make all the food items outstanding quality.
And for my cheaters out there, I have a special menu just for you. If you shift+click on the object, you will see additional options which let you immediately upgrade the vending machines. And if you want to only partially cheat and have your sim actually upgrade the object while building their skills, you can get all upgrade parts for free through this menu.