It’s nothing to do with the M1 - MacBook Pros stopped having upgradeable RAM with the release of the first Retina models in 2012. Even soldered-in SSDs started a few years ago with Intel Macs.
The 21.5” iMac, the Intel Mini and even the iMac Pro may have had socketed DIMMS but it took major dismantling to get at them - I suspect that the sockets were there so Apple could buy cheap bog-standard commodity DIMMS for machines that didn’t need LPDDR.
Not saying this is good, just that the ship had sailed long before M1 came along.
...as I said, at least there’s now a valid reason for the soldered-in RAM in low-powered laptops, and the M1 arrangement squeezes a bit more performance and power efficiency by mounting the RAM on the CPU package. Not sure what the excuse was in 2012.
The interesting question is what will happen with the 5k iMac replacement... I’m guessing it will still be on-package LPDDR RAM.