The top of the line is also not where Apple is gouging the worst. It's in the middle tiers that are actually relevant to many more people. Most don't have a need for 4+ TB main drives but 1-2 TB is a size that's pretty easy to justify for a lot of people and Apple's price is the only option for them and they're absolutely lining their pockets with cash at the expense of anyone not going for the bargain bin basic tier that can't hold 2 modern games.
Apples segmentation takes place in the nand firmware. The firmware contains the location in the storage configuration. And this may or may not be rewriteable. Iboffrc has done a video explaining how some of it works. It's all from reverse engineering though.
It's worse than that -- 4TB gen 4 drives can be had for well under $300, sometimes $225-250, and that's for buying a drive outright, not "trading up" from a 256GB device. I think it'd be more accurate to say that you can get double the capacity for a _quarter_ of the price.
I also, as a side note, try to give the loosest most favorable (to my opposite) comparison because when I err on my side it becomes a "well actually" debate a lot of the time about how it's "not quite X times as many it's more like X-1 (so I'm not even going to touch that X-1 is still quite bad)" that is really tedious and annoying especially when the favorable version of the comparison is still quite bad for their point/side.
Except Apple wanted $3,000 for 7TB of SSD (considering the sticker price came with a baseline of 1TB).
I bought a 4xM.2 card and 4x2TB Samsung Pro SSDs, cost me $1,300, I got to keep the 1TB "system" SSD, and was faster, at 6.8GBps versus the system drive at 5.5.
Similar with memory. OWC literally sells the same memory as Apple (same manufacturer, same specifications. Apple also wanted $3,000 for 160GB of memory (going from 32 to 192). I paid $1,000.