I bought an iMac in 2015. If I decided to upgrade to the new ones I could trade my current machine and get about $750 for it or I could sell it on my own for more than $1,000 (Some eBay listings are as high as $1,400). So there is also value in the machines Apple makes.
Also, the integration of the software and hardware has generally been much better with Apple than with PCs. That gap isn't as relevant today as it once was but that stigma remains part of the calculation of the brand value.