More specifically, they didn't make killer apps for their Wii fanbase. The really big franchises on the Wii were: Wii Sports, Wii Fit, 2D Mario, and Mario Kart. The Wii U got no Wii Sports or Wii Fit game. Most 2D Mario fans consider the Wii U game to be disappointing. That really only leaves Mario Kart. Mario Kart, by itself, is not enough to make a console succeed. Both the N64 and Gamecube had good Mario Kart games, but those consoles still got stomped on by Sony. So in the end Nintendo didn't have the killer apps that the Wii audience was looking for.
I want to underline this point. Nintendo had a deal with the release of Mario Kart, that with the purchase of MK8 you got another top line game released before (I had already bought most of them, so I got Sonic out of this deal). The WiiU hardware sales were much elevated (I think doubled or so) for months. Many will argue it's the deal. But I say if MK8 hadn't been a great game, the deal would've gone mostly ignored or only had sold to people already owning a WiiU. So it really mattered for hardware sales that MK8 was a great game, although the effect was strengthened by the great deal. But WiiU had not much more. Splatoon and Mario maker were great games, but they came too late. The WiiU would've needed at least two of these games in the first year. Instead they banked all on NSMBU. Even Pikmin 3 (not a system seller in itself) came only about a year later. That was not enough.
Luckily enough, the demise of the WiiU paved the way for Switch. Splatoon and Mario Maker were made in an effort to make the WiiU more appealing, and now they are contributing factors of the success of the Switch. Mario Kart became one of the main selling points of Switch.
And to contrast this even more: Switch had four big sellers in the first year: Breath of the Wild, Mario Kart 8 Deluxe, Splatoon 2 and Super Mario Odyssey. But there were more titles, that I think Nintendo might have hoped to bring success: 1-2-Switch (which should've been a pack-in instead of a full-price game) and Arms. Both failed to be system-sellers, although they are still good selling games at over 1 million copies. But the point here is, that Nintendo placed six games which could potentially sell the system into the first year. It didn't matter that not all turned out to get to that potential, enough of them worked. In an alternate world maybe people wouldn't have gone for MK8D as it was a port and bought BOTW on the WiiU. But there were still the other games. Contrast that to the WiiU, which solely relied on NSMBU in it's first year.Last edited by Mnementh - on 30 September 2019