I find it extremely hard to be productive on a laptop; the form factor is entirely wrong for concentration. Small screen, mushy crappy keyboard with a bad layout, etc. My desktop has a large monitor and a mechanical keyboard and a mouse and without that stuff, and an upright posture and focus, I can't get in the zone.
So, yes, I can hook a laptop up to all those things, but then it's just a desktop anyways. I can see the advantages for traveling, but for the last two years I naturally have not done that.
... But the worst thing about a laptop was while I was working from home there was just always the temptation to sluff off to a couch or bed and zone out. I couldn't program in that posture, but I could goof off.
Since quitting my $job and turning in my work laptop my coding productivity has gone up.
You'll pry my workstation from my cold dead hands, etc. etc.