Nintendo's current troubles with WiiU can be traced back to Wii.
The lifecycle of Wii has been cut shorter than Nintendo probably expected and had planned for. Generational cycles and product development occurs on multi-year schedules. Basically, the drop-off in Wii sales and third party support was fast and painful.
At the time, Nintendo likely wasn't very far into the development of its successor console (it also sounds like there was internal disagreement over the creative direction that the company should follow). Nevertheless, market realities have forced Nintendo to make quick decisions and to put together a presentation for E3, if only to appease shareholders and their fans.
What we're seeing is Nintendo rushing through the development of a complicated device and struggling to catch up with its own vision. There may be an element of managerial incompetence, but I think the reality is that Nintendo was caught off guard (sure -- in part, due to a lack of market foresight), and any company in the industry would have a difficult time trying to rush out a console with unproven technologies. It's just rough, period.