Nintendo is profitable despite being #3 in console market share
They're profitable because they've focused on a simple, profitable niche: people who like to have fun playing video games. They chose not to play the "own your livingroom" game that Sony and Microsoft are spending bucketloads of cash to win.
