Well, superior for Apple. But Apple is in a different business. Apple's biggest competitor is Microsoft, another closed-source company. So, for them to open up a little bit gave them an edge over Microsoft. They used what open source code they needed (BSD), and added what they could (WebKit). Apple only uses open source when there is an advantage. For example, they are using LLVM and OpenCL (GCD) to battle DirectX. The only way for others to support it is to make it open source. They also gained significant geek credit, which has been very good for them.
But Sun, on the other hand, had a whole other set of problems. Apple is a consumer facing company. Sun is a business facing company. Sun's biggest competitor was Linux on any-brand PC server. That's a big challenge. So, they fought open source the only way they knew how... join them. If your biggest competitor is free running on commodity boxes, you have to go to that space. Unfortunately, there wasn't enough of a difference between Solaris and Linux to matter to most people, so they went with Linux. There is some great open source stuff in Solaris (ZFS, DTrace), but ultimately, there just wasn't enough 'there' there.
And then once you've lost the OS war, all that was left was hardware. Which, while high-quality, just wasn't enough to keep _all_ of Sun afloat. Perhaps though, it would have been enough to support the hardware divisions of Sun.