While the pricing sucks, not all storage is created equal. Same goes for memory, mainboards, CPUs etc.
If there was only one possible choice of chip, PCB, firmware etc and all that was left for device manufactures is making variations in the amount of chips put in a metal box, either everything would be very expensive, or everything would suck because it wouldn't really be a good fit for all users everywhere.
For Apple (and Dell, and to an extent, HP), the commodity computers they sell are all just volume based profits where any and every deviation is mostly a problem in one way or another (be it something basic like unpredictable parts composition - a real problem when you need to order over a million chips, or something complicated like trying to get that R&D and marketing money back and spreading it out over the various sales).
Say you you are Apple and you need your RAM to be on the SoC interposer, you'll probably get a great deal at Samsung or Micron, but let's pretend we're buying retail. A single 8 GiB RAM chip costs about 100 USD and since you want to get a good deal, you buy a million of them. That's great, because now those chips are perhaps only 40 USD each! But now you have a problem, not everyone wants 8GiB of RAM, some people want 16 or even more! Dang, now you have to get two variations and you have to guess which one is going to get used up more, and if you made a mistake in your guess it's going to be an expensive one, because now you'll be buying those chips you don't have enough of at a higher price since you can't really go and order a million for another bad guess, you'll get 500k. Bam, price goes up to 60 USD per chip.
Meanwhile, a customer might want to buy a computer, and to make that happen the customer needs to be aware of it at the right time (availability, opportunity etc), and the computer had to be developed and researched etc. Generally, for non-cutting-edge devices, retail price is about twice the bare BOM cost. So that single RAM chip got more expensive, on top of the CTO cost of having a lower-volume device built. To make matters worse, there is only one kind of interposer for the SoC since it is extremely expensive for a manufacturer to spec those out and make reliable high-volume SoCs. So any DRAM configuration change means two chips will have to change. That 8GiB to 16GiB upgrade now means two, twice-as-expensive chips have to be used. Suddenly that ~200USD difference for what is essentially a 'simple' upgrade makes a bit more sense.
This does of course not have all the secret Apple sauce in it, and I bet they get a far better deal than the ODMs I know about, but still, high-end electronics manufacturing sucks. Most LPDDR4X RAM and M.2 NVMe SSDs aren't high-end manufacturing either, especially the ones you'll find in consumer devices like desktop computers and laptops. They might be high-end consumer items, but manufactured the same way as a SatNav...
How do others do it cheaper? Two options:
- Make smaller configurations 'worse' than bigger configurations (lower bandwidth for example, single-channel modes)
- Bigger chassis so you can use modules, with the added cost of connectors and lower QC pass rates
Modules can be much cheaper because you essentially re-use every chip many times. On top of that, you don't need to do some weird expensive SoC interposer thing, you just use a generic PCB and you can generally just leave off any memory chips on the lower capacity ones essentially doubling your profit per chip size. Because as a module vendor you're just selling entire modules as-is, you can simply keep doing the same thing over and over (well, if you are an independent vendor, a chip manufacturer who also sells modules like micron or samsung have different problems).
This entire story applies just as much to SSDs, with the difference being:
- Crappy performance due to low-end controllers and/of flash
- Crappy reliability due to QLC memory with low over-provisioning
- Lower degree of integration due to controller firmware being 'super secret' and no OS vendor having access to it
A reasonable (below-spec for high-end electronics) NAND flash storage chip, QLC, costs about 200USD per TB. But you can't just use a single chip, it would be dead after a year. Instead, you have to use multiple chips, generally at least 4. Sadly, 4 chips of 1/4th the capacity aren't also 1/4th the price each, more like ~30%. So that 1TB of capacity costs 30% more now (because you need 4/3 of the price). At Dell/Apple/HP scale you definitely get those chips cheaper, but it's not like your 1TB of high-grade NAND suddenly goes for 100USD. On top of that, higher speeds and higher endurance are achieved with more chips and better controllers. Keep in mind that SSD's are generally just RAID arrays of a bunch of NAND chips. Say you end up spending about 180USD for 1TB of storage, that's 360 USD for the customer, at least.
For most people, even the concept of making a well-balanced choice on any of this is so far beyond the realm of reasonable it's just a matter of 'bigger number, thus better' to sell them anything, no matter if it is good or bad. That brings us to the last point, or perhaps, 'problem': brand. While most brands pull weird crap just as much as Apple do, in general, you can 'buy' a good UX from a manufacturer that does it all in-house. So if you buy your Windows-device from Microsoft or your macOS-device from Apple, it's likely that it'll work fine and be good to go out of the box. That in itself has so much value that packaged products like that are really a case of "don't rock the boat" for them. Whatever they do, they'll want to keep that expectation of "it will just do the thing" for as many potential customers as possible. Anything that endangers that has to go.
Of course, everyone still makes mistakes like using fabric-like stuff and gluing it down (MS) or using flat-flex cables that can't resist the wear and tear of normal use (Apple), but so far, the general expectation of "it works" is still very much alive amongst the customer base, which is a far bigger driver than the small (but vocal) group of brand-fans. For most hobbyists, DIY, third party aftersales etc. modules are better. For everyone else it's a nearly irrelevant trade-off.