If there's suddenly a potato famine, then the cost to other people who don't have a potato field is however much they are willing to pay to avoid starving.
Apple doesn't have a potato field, but what they do have is a ton of negotiating power, market share, and enduring relationships with the manufacturers.
There's also the implicit threat when negotiating with Apple that they might enter your market if you fuck around with them. If Apple perceived DRAM/NAND prices to be a significant threat to their carefully curated pricing structure, they might decide that they need to vertically integrate.
Last time I checked going from 16 to 32GB in a Mac Mini was more expensive (or as expensive) than buying two 16GB Mac Minis.