Of course it has not been worth it. They have had to lose billions on PS3 just to be the more dominant force in what is currently a niche market (which is what HD disc sales are whether Sony fan boys admit it or not). It is not as if it is only Sony that would get royalties. As far as I am aware Toshiba is the only one getting royalties from DVD yet I don't think they have made that much from DVD sales to make it not a nig deal for them to lose billions on the basis that they would recoup on royalties, etc and make billions on top.
I guess to answer the question without considering other factors you could say it is worth it on the basis that if Blu-Ray succeeds they could make more from royalties, etc than they would have from PS3 hardware and software sales. But you have to consider at what price the victory would have come. They have had to lose billions in the console market to achieve this victory. I think they would have been much more better off if they released PS3 without blu-ray. They would have made money on the PS3 rather than losing tons and they would have made money on Blu-Ray though less than they would now with blu-ray in PS3.
To llustrate my point with random sample numbers:
With Blu-Ray in PS3:
PS3 - loss of 100
Blu-Ray - profit of 120
Total Profit - 20
With no Blu-Ray in PS3:
PS3 - Profit of 50
Blu-Ray - Profit of 30
Total Profit - 80