I've worked at several places that had self-serve snack bins that you were expected to pay for, but the machine was just a pay kiosk, not a vending machine.
Typically, the way these operations work is that either the employer contracts out the snack bin to a vendor, or the employer buys the snacks themselves, then charges the employees for them. In either case, if the expectation is to pay for the snacks, and you don't, that's theft.
I have complicated opinions about whether or not an employer should charge their own employees for break-room snacks, but once an employer decides that they should charge for the snacks, then the loss is clear when a snack is taken without paying.