Some Japanese restaurants are super tiny & ordering machines make it easier to use the space more efficiently. In some cases the machine is installed from the outside - you select what you want and get a ticket or two. If you get two then you are IIRc supposed to give one to the staff & they will start processing your order (eg. the machine is not always connected to a terminal inside).
Doing it like this you save space inside, don't have to handle dirty cash (less of an issue with electronic payments) and can concentrate on cooking without interruptions.