GoG has a slew of arcade games for sale, that are essentially emulator+rom combinations. Double Dragon, Metal Slug, Neo Turf Masters, etc are all available for purchase with a good ROM.
There are also licensed miniconsoles and cabinets (Arcade 1Up and others) that are likewise just hardware+emulator+rom combinations, and you can legally extract the roms for your own purposes.
And there's more. I have a sizeable legally-acquired ROM collection, now. Even console games - Genesis games on Steam, PSX games on PSN, etc.
But who cares? You purchased the software, you can do whatever you want with it, and going this route is already going above and beyond what most normal people do, which is pirating the ROMs.
You can find a handful of ROMs that are actually free on MAME's website:
There aren't many and none of the really famous titles is free.
I would imagine that posting links in HN to such content would be verboten. Perhaps it would be acceptable to offer a hint. There used to be a site called Pleasuredome that shut down recently. They were the place to go to obtain any and all ROM / CHD files. I would suspect that if one were to search using the word "Pleasuredome" along with other obvious related key words, one could quite easily find what one was looking for.
https://archive.org/details/arcade_wrally
Proof: https://web.archive.org/web/20090218020517/http://gaelco.com...
However, some games are freeware [0], I guess you don't technically buy those, but they certainly are legal. Some homebrew devs might be selling ROMs this way, too, but you'd have to reach out to the devs. If you want to license individual games, you'll have to figure out who owns them & ask. They likely won't part with it, as these deals aren't really B2C. Plus, you might be competing with Arcade 1 up, whatever they think they can get from selling on services like PSN, etc.
0 - https://en.wikipedia.org/wiki/The_Adventures_of_Robby_Roto!