Emulation and virtualisation is a pretty standard, official, way of running software on other devices, where the software licence also doesn't stop anyone from doing so.
Emulating also isn't illegal by itself of a direct link to pirating, it is just a very common way of playing pirated games.
I assume you are probably trying to make fun of the comment or playing devil's advocate or something, but you are correct. The illegal part comes when you try to share things you have no rights to share, such as the ROMs or BIOS.
Just as you can go to to arch linux' web page and download through their recommended method (torrent), you can go play old PS1 games on the PSClassic (based on the PCSX emulator), or play GB/GBC games on your 3DS Virtual Console (in house nintendo-made emulator afaik, correct me if I'm wrong).
I interpreted the comment as a comparison between torrenting and emulation, "but torrenting isn't illegal but is used for illegal things" and thought it was implying the opposite for emulation, i.e that emulation was illegal.
I was making fun of that comment to point out the same is true of emulation. However I obviously misinterpreted the initial comment since you're clearly aware emulation itself is legal. Sorry.
Emulating also isn't illegal by itself of a direct link to pirating, it is just a very common way of playing pirated games.