> optimally drain their wallets
I mean, that's basically it. The difference between part costs of 8GB/16GB/32GB RAM chips is nearly a rounding error, and they're probably eating a bunch more costs stocking and adding assembly for different RAM SKUs.
It goes by many names, the "microeconomic pricing strategy where identical or largely similar goods or services are sold at different prices by the same provider to different buyers based on which market segment they are perceived to be part of",
https://en.wikipedia.org/wiki/Price_discrimination