Ninety-nine percent of people only need a web browser and an office suite to work on their PC. Apple provides this with superior UX.
The remaining one percent is split between people that need something to process one type or combination of data, and people that need a fancy text editor and compiler. Apple provides these with superior UX
The value isn't in the hardware, it's in the UX. They've got the closest ecosystem to just works™ as can practically exist. No setup and no downtime is a lot more valuable to the average (individual, desktop) user than customize-ability or technological freedom (real or perceived.)
That's why apple makes money.