Sony noted that it's had to invest large sums of money into research and development for the PS3 and that it's possible that this money may not be recouped if the console "fail[s] to achieve such favorable market penetration... resulting in a significant negative impact on Sony's profitability."
I believe the Xbox 360 has lost $1b, and has only just become profitable. The Wii I think also loses money, but very little. The PS3 won't be profitable until perhaps another year or two.
I suppose $3b (or probably $4b by the time it is profitable) is worth it if it wins the gaming and HD video market.