Such a strange system, but in a way a very logical move after they made a fairly hard pivot with the original Wii. For those who were there at the time of the original Wii announcement, Nintendo suddenly looked like a very crazy and different company than the one we all had known since the dawn of modern video gaming (Donkey Kong in the arcade, Game & Watch handhelds, the NES & SNES supremacy). There was a lack of certainty about "what the hell were they thinking?!" at the time, but in hindsight all the moves they have made (Wii up to now) make a lot of sense for their continued success, as opposed to if they kept trying to compete with Sony and MS with their more "traditional" consoles, trying to outdo one another with envelope-pushing technology.
WiiU was the crucial junction that was necessary to get them to such success with Switch and, once again, to carve out a (fairly huge) niche of the market. It's difficult to imagine where Nintendo would be had they stayed the course that GameCube was charting, otherwise. Not to cast that system in a bad light, as it was obviously a necessary step as well.