> Excuse my ignorance, but what kind of games do not require ROMs? I mean, where's the
> game code coming from? out of thin air?
In the graphic in the original post, the vast majority of the machines that appear are game consoles that have cartridge slots. MAME has included game consoles since 2015 and MAME 0.162. The game code comes from the cartridge. The game console itself has no ROMs.
The one exception there in the graphic is Pong, which is an arcade game which has no ROMs. Its "code" is game logic designed into the hardware using transistor-transistor logic (TTL). MAME includes a version of the Pong emulation which uses an external hardware description file that's effectively a schematic (called a "netlist"), which is newer and slightly more experimental, as well as a slightly older version of the Pong emulation which contains all that information built into the sourcecode. Either way, there are no ROMs for Pong (arcade).