There's no engineering reason that makes RAM on apple computers cost much more than market prices. But it's convenient to apple…
Completely custom chip? Best webcams? Extremely tidy internals. Insane audio. You can hate on apple for many reasons but that their hardware is top class and this will demand much more engineering cost is really clear.
That said, I do think upgradable laptops are important as a resistance force against constant upgrades and planned obsolescence; if you could hypothetically add 2x32GB DDR4-2100 to a decade old ThinkPad and run stolen Apple Intelligence LLM just fine, the humanity wouldn't need $5k worth of labor wasted on one laptop per person per year.