As a technologist then yeah Nintendo sort it out. That said if I were tasked with making online systems for MS and Sony, and not doing them as a money extraction/exclusivity service then I would have done them in very different ways as well. Though MS and eventually Sony showed themselves to be at least partway competent (Sony's breaches and the general cheat issues not withstanding).
As for why Nintendo failed that could get interesting. Obviously MS had a huge advantage with already running online PR/communities (though spiceworks, the likes of stack exchange and maybe some of the others there have gutted it somewhat, and MS is getting ready to deliver the finishing blow itself, the community side of the technet service was pretty good), servers, networking and more and if you look at Sony's purchases, open source contributions/releases and history they are not exactly starting from scratch. Nintendo, a handful of recent things aside, seem to be hesitant about using such things (many view the adding of wireless to the DS in a firmware update in odd ways, some say it was more licensing in case the DS flopped and it was precarious for a few moments there, some say it was unfinished and others say it was more to avoid committing too hard to the idea) and even trying to build everything from the ground up.
That said if they keep it free it could have some interesting effects, as long as they have some semblance of competition with the others anyway. When dealing with competition there is a phrase along the lines of "someone might be doing something like what you do worse" (as long as it is not radically different cheaper does not come into it so much if only through inertia), it is arguably how MS cornered the DOS era operating system market. Likewise Nintendo might be said to be end running around running their own setups, I am not inclined to see it as some genius or even idiot savant move though. The idea would run that you generally just want to play with real life or online from elsewhere friends, both of which are not especially hard to share info for, and most people can see to having chat set up to go over other mediums anyway. By doing as such you avoid having to set up proper matchmaking and proper communications options. The game specific vs person/mii/console specific codes was a bit odd and what makes me less inclined to think it was less a calculated move and more of a happy accident though.
Of course this is ignoring the less than stellar forays into downloadable games and policy there, how much was lawyer hamstringing (or lawyer incompetence) and risk aversion will probably be a debate for the ages.
Now I have not set up networking for users with numbers likely in the 50-70 million range and playing at that level has some interesting traps, especially if you do not plan well from the start (bets on Nintendo had a plan to scale their networking resources up). This leads into a vicious circle where you massage things to keep them running and also why you might not get out of it, see also why nobody sensible does government IT contracting without checking first and also as they are a game company they might not offer the good money others might (I doubt Nintendo are offering finance company money).
In short shortsightness caught Nintendo with its pants down, they fumbled before making an ill considered entry into a world that barely understood, which predictably turned into a pig's breakfast as it rapidly outgrew them and now Nintendo is left maintaining something it did not seemingly want, plan well for or execute when it came to pass.
Its ironic that Nintendo, being the first console maker to experiment with internet (SNES), is also the worst at providing an online experience.
As crappy as it is, atleast its free. Still Nintendo just doesnt seem to get "it" outside of marketing and game developing.
The Satellaview was 1995, Sega Meganet was 1990.