Apple’s a huge company: 500+ retail stores, 130,000+ employees and over $2 billion per month in operating expenses, including $1.5 billion per month in R&D expense.
...and huge economies of scale given the resulting ability to buy in quantity and negotiate tough quid-pro-quo deals with suppliers, not to mention the money saved by selling a large portion of your output directly to customers rather than letting Best Buy, Walmart, Amazon et. al. take a slice.
However, the kind of logic you're suggesting is part of the problem: whatever it might have been in the past, in 2020, the Apple retail store network is there for iPhones, Watches and Apple gift cards (with a side-order of general flag-waving for the brand). There's no way that a personal computer range can come close to justifying that sort of infrastructure (that's why you don't see many Dell, HP and Lenovo stores in prime retail locations).
Likewise, R&D - I'm sure that the R&D bill for the Mac Pro looks impressive quoted in isolation - but I'm also sure that it is a tiny fraction of the R&D budget for the next iPhone (Existing tech like T2 and thunderbolt + reference Intel designs + lots of stock ICs
versus ultra miniaturisation of every component, new camera technology, new display technology, new battery technology, fully custom system-on-a-chip...)
If Apple are expecting every Mac - especially the higher-end ones - to pull its weight in Apple Stores and subsidise iPhone R&D, then the Mac is pretty much doomed... but that's "unicorn start-up" thinking: a large corporation making everything from watches to TV shows doesn't need all of its divisions to cleve to the same business model - frankly, they're ahead of the game if they're all in the black. ...or do you think Samsung has the same mark-up on their fridges and dishwashers as they do on the Galaxy Fold? Because that's what personal computers
are in 2020 - mature, commodity tech, who's boom time has passed, but which people still need and pay good money for.
The Mac business is still solid and profitable: gimping it because all you can see is that the revenue is 1/10 that of the iPhone will kill it... and the thing about the Mac is that it is an
ecosystem that relies on sufficient users and diversity of uses to keep software and hardware developers employed. Affordable machines for power users/developers (no "xMac"), for basic office productivity users (no sub-$1000 MBA replacement) etc. are an essential part of the ecosystem, even if they're not the most popular. You can't build an ecosystem with just meerkats and elephants.
If Apple offered a cut-down version of the Mac Pro, say four PCIe slots and six DIMM sockets, and Core-X instead of Xeon, it would save Apple maybe $500. You’d still be looking at a $5,000+ machine. Still interested?
First, that's a nonsense price - you don't make an "xMac" by taking the Mac Pro and pulling bits out. The whole
problem with the $6k entry level MP is that its
already a $50k machine with the good bits missing: you're paying a huge premium to get a machine with a huge PSU, a motherboard with slots for 1.5TB of RAM and enough PCIe bandwidth to run quad GPUs and an afterburner or two - if you
don't want to add $24k+ of upgrades then you're paying $6000 for $2000 worth of performance.
...so, yeah, offer me even a $6000 Mac that is even slightly competitive with the sort of
usable spec you can get for $5k+ in the PC world - as soon as you ditch the requirement for 8 PCIe slots and 1.5TB of RAM slots - then I'll at least think about it.
...but, honestly, $3k+ would be a more sensible price for a straightforward Core-X PCIe tower, a target Apple have always managed to meet in the past even with
Xeon CPUs (PCIe towers built from standard parts
should be cheap to develop and make - the $3k Mac Pro trashcan, completely made from custom parts, would have been far more expensive). Even that would carry a substantial premium over the sort of PC you can get for $2k+
and it wouldn't necessarily deter those legendary "true pros" who need the power of the $50k Mac Pro.