I mean, on the other hand, there's plenty of other things I could code on. I have a Nintendo Switch with root access, but that doesn't make it an appealing device to write code with. Hell, SSH could run on Apple Watch with a Bluetooth keyboard. Once again though, there's simply no point. You may as well get a laptop, it sounds like you only intend to use it with a keyboard anyways.
I do primarily use it as a laptop... but ~30% of the time it comes off the case and gets carried for data input. Then it's the best tablet I can spend money on, has a very responsive stylus and weighs about the same as a clipboard and pad.
It's the most flexible computer I own. It could be even more so, which I would appreciate, but that depends largely on apple.
For the work I do I can code *locally* but I *don't have to*. Comparing it to a Switch is completely missing what makes them different. Even an attempted reductio ad absurdum should be a little more rigorous than that.