I question if Nintendo has done anything wrong. With big guns like Sony and MS in the market, Nintendo continue to print money with their hardware and software. If anything strategy wise, I would say that Nintendo has been 2 steps ahead of both Sony and MS.
They are now, I'm refering to the rise of playstation and the runaway success of ps2 vs Gamecube. Sony understood that their audience gets older with new generations coming in as well. Nintendo seemed to keep focusing on consoles as a toy, while the ps2 was a media player as well. (Which is what scared MS into jumping in)
But Nintendo corrected and jumped passed Sony's following the growth curve of games, marketing the Wii to young and old, play with your grandparents, brilliant strategy. But not a demographic that understood the WiiU. And now Nintendo has taking over the mobile gaming market with the Switch, consolidating their two fan bases in one device.
Nintendo has wisely benefited from the MS Sony rivalry. While the 2 big guns were competing on graphics, sales and putting things out (too) quickly, Nintendo simply kept the HW price down, software price stable (no use waiting for sales, just buy it now and it will hold its value) and game quality high.