When Sega's consoles stopped selling, they started to just make games. Now they mostly make Nintendo games, only occasionally making one on a Sony or Microsoft console.
Imagine for a moment that Nintendo sucked at consoles and went the same way as Sega.
Who would they make more games for? Sony or Microsoft?