MAME is an emulator that emulates thousands of different arcade games on modern PC hardware. This program is often used along with real arcade cabinets to create "Mame cabinets" that are usually of dubious legality, and certainly can't be stuck out in public to accept coins.
But, MAME machines can be vended in a commercial environment legally if a few conditions are met. Basically you have to have a license of some sort, which should be inside the machine. The only license available for most games is having the original arcade PCB or ROM board. Some companies may also be willing to sell commercial emulation licenses which do away with the need for the original hardware (the Ultracade people managed to license tons of stuff).
Now why in the world would you want to emulate a game inside the machine when you have the real hardware in there already? There are several valid reasons, but the most common would be defective hardware. For example, Pole Position has boardsets that just self destruct. You can't leave them running on location, because they will just keep breaking. Other games are similarly spotty, and every game that uses an X-Y monitor is hard to keep running right on location anymore.
So the game owner can simply toss a cheap computer (and monitor too, in the case of vector games) inside his problematic game, and have it eating quarters again in no time.
The other reason to use a MAME computer instead of the original PCBs would be to set up a multi-game, which is currently fairly hard to do with original boardsets. But is simple with MAME (just make a menu, and then be sure and stick the original boardsets somewhere inside the cabinet).
Remember, when vending a MAME machine, you should always have the original PCB/ROM board/media inside the machine, even though it isn't hooked up to anything.