The vending machine provides a way to make indirect trade with other players. Using the read administration panel, you are able to create a limited number of Buy/Sell orders for all items and resources, at varying amounts, to do trade. Another player simply walks up to the front of your vending machine, interacts with it, and has a menu listing all of your trades and can make a purchase from there if they have the required materials.
Although your resources may be safe from the front, if a raider gains access to the rear panel, they will have free reign over all of your goodies. Keep it safe.