Packaging flash storage onto the actual SoC SiP costs more than manufacturing the same amount of storage into an M.2 or external USB form factor, so that price can’t be directly compared. They’re making a big chunk of profit on storage upgrades, and on cloud subscriptions, but it’s not exactly cheap to give everyone 1TB of storage at that base price.
You’re right, it’s not the same die, but the advanced packaging techniques that they keep improving (like the vertical stacking you mention) make for a much tighter set of specs for the raw flash storage silicon compared to what they might be putting in USB drives or NVMe sticks, in power consumption/temperature management, bus speeds/latency, form factor, etc.
So it’d be more accurate to describe it as a system on a package (SiP) rather than a system on a chip (SoC). Either way, that carries certain requirements that aren’t present for a standalone storage package separately soldered onto the PCB, or even storage through some kind of non-soldered swappable interface.