There are no vending machines in my schools. :'( Instead there's these Yakult ladies that come in hocking overpriced Yakult beverage products. I usually duck out and go to the vending machine down the street or to a conbini instead.
One school doesn't care and lets me leave whenever if I want to go to the conbini (or the bank, post office, or wherever), but the other is stricter. The bitch Kyouto Sensei ran into me once when I was heading off to buy lunch. There is no problem doing this and it's perfectly fine, BTW:
Bitch: ....
Me: ....
Bitch: WHERE ARE YOU GOING??
Me: Uh, to get some lunch at the conbini.
Bitch: THERE'S LUNCH UPSTAIRS NOW.
Me: Yeah...that's O.K.
Me: ....
Bitch: OH YOU DON'T LIKE SCHOOL LUNCH?!
Me: No, just today's. No thank you.
Bitch: ....
Me: Yeah, so imma go now.
Then when I came back, she was telling every teacher in the room how I didn't want to eat "their lunch."