Perhaps you've not heard of marketshare and mindshare, but in modern business they are more important than profitability. Consider Amazon.com, who didn't make a profit for the first 5 years of their existence. Hugely successful, but losing money every day. The reason they were successful is that everyone knows they will eventually make all that lost money back, plus more. The same with Google, Yahoo, YouTube, and the list goes on.
Microsoft are spending money to win. They don't care how much it costs, they just want to have a lot of Xboxes out there so that it can link up to Windows Media centre or a PC or whatever else is in the plans. And if they are successful they start to rake in big money.
The Gamecube was a loser because Nintendo came out with a badly tarnished reputation. They make a kiddie console with no serious games, they got left behind by the 'cool' companies Sony and Xbox, and their future was bleak. That's exactly why they have to take relatively risky options now, with the DS and the Wii. Nintendo would never have gone bust, but when their popularity falls behind the other two makes they lose support. The 3rd party support of the Gamecube was abysmal. Many retailers have stopped selling Gamecube a long time ago.
It's not just about money.