Japan also has very flexible zoning for residential and commercial uses, so nearly anyone can host a vending machine as a commercial enterprise, which would generally not be allowed in most other places with different laws.
Also, some of them are insanely thin, like 25cm depth for a cold drink machine, so they can fit nearly anywhere with a power outlet.
The vast majority of vending machines in Japan are allmost as deep as American counterparts. And even if not, maybe we could just have more thin vending machines here.
Also the zoning issue is just a very clear policy failure. I don't think even the most hardcore NIMBY suburbanites would complain about being able to get meat and dairy steps from their front door in an automated low traffic fashion.
Also, some of them are insanely thin, like 25cm depth for a cold drink machine, so they can fit nearly anywhere with a power outlet.