Nintendo's been openly emulating their own games since about that time. IIRC, the SNES Virtual Console on the Wii had code from SNES9X in it.
The distinction (which seems nobody cares about) is that Nintendo's going after copyright infringers. If your emulator doesn't use any of Nintendo's code, they ain't doing shit about it; they're just gonna steal it, if anything.
Yuzu supported unreleased games. To do that required using Nintendo's code, and getting that code through unauthorized channels. Nintendo's code may not have been distributed through Yuzu, but it was used in a way that was not permitted in order to engineer a way to circumvent the copy protection of those games. That was how Nintendo was able to go after them.