Piracy is free games. People want games for free. Regardless of whatever service Nintendo offers for it's legacy games, some people will still be stealing. Because they don't want to pay. And there'll be websites to help those people do this.
For some people, it's because it's free, but that's far from being the only factor.
1. Cheaper than official services
2. More selection available than official services
3. More convenient than official services
On PC, services like Steam and GOG fight piracy by being better than piracy at #2 and #3 while providing reasonable prices through sales and price drops for older games.
Nintendo services lose miserably at all three aspects when it comes to classic games.
1. They're way too expensive. Sure they can't beat free, but they could do a lot better than they are.
2. Weak selection.
3. Horribly inconvenient. Nintendo's online account stuff is always annoying to deal with, but the main problem is that they don't allow things to transfer. All the virtual console games I bought on Wii are essentially gone because I can't transfer them to the Switch and the Wii is in a box somewhere. By contrast, pirated ROMs can stay with you pretty much forever if you just keep moving the files to each new pc. ROMs I downloaded 15+ years ago are still perfectly ready to play.
The biggest blow Nintendo could deal to ROM piracy is to host their own service. Wide selection, low prices (like $1 or $2 for NES games). They can't beat the price or selection of ROM sites, but they CAN win on
convenience if they would just try. Instead of tying someone's collection to a single piece of hardware, let people build libraries that will last forever and span multiple platforms. If I could buy a game and have it playable across PC, mobile, Switch, 3DS, and all future Nintendo platforms, that would beat the hell out of pirated ROMs. Especially when you add in the value of knowing that you're getting official versions without the risk of viruses/malware.