Let's not pretend that Apple doesn't charge HUGE premiums for memory/storage.
For the iMac Pro it's $400 to go from 32GB to 64GB of memory. High end memory is around $140 for the same jump. "High performance" - it's the same 2666MHz chips.
Storage? Samsung NVMe prices are around $300 per TERABYTE. Tell more about the high performance silicon Apple is using that is worth $800/TB.
The highest speed consumer M.2 drives go around $180/TB. Apple doesn't pay retail prices. $40 could well be a significant overestimate, especially given it's displacing an existing chip.