Google makes Android and their phone makers and variants (which unfortunately isn’t always limited to drivers and shells), there’s no way to make Android well ubiquitous for thousands of different models of many phone makers.
Apple makes 2 to 3 new models for each category (phone, tablet, computer), makes the same CPUs and makes the same OS, so that the integration is optimal.
A camera with a 20MP sensor looks better than a camera with a 10MP sensor. For the same reason, phone makers sell phones that have as much random access memory (RAM) as regular computers. Just because it is possible.
A desktop/laptop is a different device than a phone. I wouldn’t buy an iMac M1 with 8GB of RAM in 2022. That might be enough now, but you’re buying such a computer for 5-10 years.
At the same time, that’s how the M1 should be, too. The CPU is equipped with accelerators for everything important within the MAC environment. The more diverse and general the workload, the more benefits are lost.
All things considered, the M1 is not a CPU, but a SoC. The RAM is not installed on the motherboard, but is built into the M1 board. This saves another level 2 and 3 cache with all the management (hence the delay) around.
Not magic, but definitely harmony.
No magic, just clever design.