For a good portion of work a laptop can do everything a "desktop" can, including big monitors and additional keyboard/mouse. And it has the added benefit of taking it anywhere. It's a desktop when you want it, and a laptop when you want it.
Sure, there are plenty of resource intensive applications that would be better suited for a desktop, but i highly value the mobility. And i work in a very strict 9-5, (nearly) no work is taken home past clock-out. Barring freak outages of course (i have yet to see one in my time here, \o/)
edit: Fighting my comma demon.
Can you explain this part? What's the mobility getting you that's worth maybe halving your RAM (for example) for?
Sure, ram is always nice, but i am able to do my work and take my laptop (which i also code for fun on) wherever i am. Hotels/couch/offices/etc.
I'm not stuck to a single spot, in a single room, in a single building. It's a really, really important feature to me. Even just at my house i move around the house frequently.
Sure, that makes sense - from the way you said you only worked 9-5 I took that to mean you were talking about a work computer.
I know that technically breaks the rule of "strictly 9-5", but i think nearly all jobs have people on explicit or implicit pager duty. Even if you don't have to do anything 12 months out of the year, it might happen, you might need to respond.
/shrug
Keep in mind this has never happened for me. Nor do any of my home plans change because i like to be available. And even at my last employer (for example), i liked to be available despite us having a planned & paid for pager duty rotation. Why would my employer pay me extra for not doing anything at nights 365 days/y? I like to be potentially available, it's my choice :)
If you have meaningful ownership (not just a handful of probably-worthless stock options) then by all means work as much as you like. But if you're an employee then it's not as simple as just being your choice, you're forcing your colleagues into a race to the bottom. There's a good reason we have laws about e.g. unpaid overtime.
At my desk I use a dock to connect 3 high resolution monitors to my laptop via a single USB-C port, which works really well as a replacement for a desktop PC, then I can disconnect it, go to a coffee shop or a conference and continue working without even having to close my IDE.
Now we are at the point where your laptop can confortably drive a couple of monitors when you want it to, but can also be portable and light with good battery life when you want it to, you don't need a desktop PC.
Also, if you work in multiple places, you can have a couple of screens and a keyboard/mouse on your desk in each place, rock up with your laptop, and plug in.