According to Newegg, you can buy a 16GB RAM kit for $32 *total*. A $200 upgrade should be getting you 64GB+ and base models should really have a minimum of 16GB.
I'm not sure this is a fair comparison. The M2 was manufactured using the considerably more expensive N5P technology node. The 28nm cpu in the rasperry pi 4 was designed using a value node specifically to drive down price / transistor. EUV lithography is extraordinarily expensive so paying a premium for it seems appropriate.
If they're using RAM like that, they're pouring money down the drain. RAM speed matters, but 8GB is such little RAM that most users will experience paging from just using their web browser. It's kind of like those guys that put modified exhausts and spoilers on a 2001 Honda Civic.