the wii u failed for many reason but the biggest was its name Wii U it confused the crap out of people for the longest time i thought it was a tablet for your wii and not its own new thing. The marketing also sucked badly with it so A it confused me and b didn't convince me to buy the thing i was confused about it was until the NX had been announced that i started asking for it but then I heard about the Switch and it was over its why I still don't own a Wii U.
The name was a mistake, but not so bad they couldn't have recovered from it - when the 3DS first came out a lot of people thought it was just another DSi-type incremental upgrade on the original DS rather than a whole new platform. But it eventually recovered thanks to Nintendo managing to get a couple of killer apps (Mario 3D Land and Mario Kart 7) out in a reasonably timely fashion, and Sony making a complete hash of the PS Vita.
The Wii U basically ended up being the opposite - almost nothing worth playing for a whole year, then when it finally got a killer app (Mario 3D World) it ended up being overshadowed by the launch of the PS4 and Xbox One. And while Microsoft seemingly tried their hardest to torpedo their own console, this time Sony made no such mistakes.