As Evan stated, The Pokémon Company manages the Pokémon property and Nintendo is simply an investor in that company. Game Freak, the developer of the handheld RPGs, is also a relic from an era when console manufacturers had ‘second party’ developers, ie. Insomniac during the Playstation 1–3 era, who were not owned by the publisher yet created content exclusively for their platforms.
But they may be branching out more in the future, especially if they can farm the Pokémon property out to other developers in similarly compelling fashion going forward — they released a PS4 and XBox One game called Tembo last year, published by Sega.
Still, your observation is valid in every other respect. Nintendo led the fad with their motion controls, but when the fad faded they chased another fad and fell flat on their face for it (ironically, while I do not own a Wii U, it’d be hard to argue the games on offer for that platform are not demonstrably better than most anything released for its astronomically more successful predecessor).
The significant increase in Nintendo’s stock value suggests the general public, even within the investment community, are similarly confused as to where all of this is coming from. I wonder if the market will shift towards Niantic, Game Freak and The Pokémon Company in the weeks and months to come, or if Nintendo’s cut is significant enough to invite interest in their actual business as well.