Not all RAM is dirt cheap. RAM in DDR4 sockets is dirt cheap.
So yes, arguably there are fewer parts (just one), but in the event of e.g. some bad RAM during manufacture, it's far more costly to throw out the chip containing that bad RAM.
https://www.macobserver.com/analysis/understanding-apples-un... is an article which describes the architecture. It's not on-die, it's next to the CPU, basically as close as it could physically possibly be without being on the die.
Here's a photo of an M1 CPU:
https://www.techinreal.com/wp-content/uploads/2021/05/2feddf...
Those chips on the right side are LPDDR4x chips (which you can verify by googling the part numbers visible on them). They are "off-the-shelf" so to speak, not custom on-die memory.