Apple hasn't been selling just ram for a long time, they sell vram. Try getting 512 gb of HBM on current Nvidia cards - it's gonna cost way more than $ 24k. And here you get the same amount of memory for weights right in a quiet unit under your desk
Put together a similar build with a couple of rtx 6000 Ada cards and Apple's price tag suddenly looks pretty damn reasonable
HBM itself is very expensive but it’s not really fair to compare to LPDDR or GDDR
They’re very different things.
The more logical argument to me is that Apple uses its upgrade price points as more than just direct BOM and rather as a proxy for things that are amortized across all their sales like support/warranty/etc so higher SKUs subsidize the costs of the lower ones.
The RAM in the M5 is LPDDR5X, not HBM. You're right of course that it's unified and used as VRAM in that sense.