I code, use docker, use VMs, play with LLMs. An M-series apple with 32GB does everything I would need from any desktop I'd be willing to pay for, comes with me so I can continue work on a train, lets me monitor email at work....
And if I need a bigger screen, sidecar and airplay work wonderfully. A wireless trackball plunks wherever my laptop is and I have everything I need, any time.
The desktop necessitates a permanent station with keyboard, power, and monitor. This necessitates a desk, which carves out a piece of my living space for an activity that is sporadic. It creates a need to synchronize not just code but workspace state across N devices, and synchronization carries inherent cost.
In a very many ways, laptops are more efficient with life, time, space, cognitive burden, and the sacrifices don't actually matter that much because they are trivial to mitigate.