Nokia has also been in the market of selling the infrastructure for mobile networks for a long time. And, unlike the handsets, this is a very profitable place to be. Both Nokia and Ericsson saw the commoditisation of the handset market and Nokia in particular watched their margins evaporate and decided it was time to get out. But because they're now no longer in the public eye, they're perceived as losing. Now their customers are people who make money from the products that they sell, so are willing to pay a reasonable premium because a few minutes of downtime costs far more.
Of course, when Apple decides to concentrate on the high-margin part of a business, no one claims that they're dying, because they concentrate on a consumer-visible part of the market.