In the 1990s it actually made some sense. If you go back to, say, 1993,
every RISC vendor was selling chips that were much,
much faster than x86. It was working like gangbusters.
The problem is that development costs rose and rose and rose without bound. Even if you could outsource fabrication, just designing your chip would bankrupt you.
HP, to their credit, saw the writing on the wall. The Itanium started as a joint Intel/HP project. It was HP's attempt to get Intel to pay for their new generation of chips, and sell it to the broader industry, in the hope they could have a new generation that would be (somewhat) backwards compatible with PA-RISC, but get off the treadmill of escalating development costs.
It was a clever plan, but as we know now, it didn't work worth a damn. Practically nobody but HP actually bought the IA64 chips. Intel quickly realized it wasn't worth any further investment and let HP's badly-needed chip series wither on the vine.
Sun didn't even have that much of a plan. They kept making chips they could not afford, and when "Rock" threatened to bankrupt the company... they just gave up. Even though giving up also threatened to bankrupt the company.