It is definitely sure that you will encounter a vending machine during your stay in Japan. Vending machines are everywhere and even located outside, which is very rare in Europe.
Then, since COVID-19 crisis, many vending machines which sell various items which did not exist before 2020. For example, there are vending machines selling ramen noodles and gyoza dumplings.
There are several reasons to sell items via vending machines. The first reason is the cost. You do not have to hire a staff. The second reasons is the operation hours. Not like stores, vending machines can sell non-stop. The third reason is the COVID. Customer do not have to meet any one upon purchase. Which means less possibility to be infected to the virus.
I assume that these vending machines will not appear in Europe. There is more risk against thief rather than the virus. It is too risky to keep the vending machine outside 24 hours a day. Probably the income will be less than the expenditure....