This is the problem(with Apple); this device, like iOS devices, is fenced off, so you cannot run vscode etc if you don’t connect a MacBook. For this device it’s actually worse than an iPad to disallow that: it’s 4x as expensive as a MacBook Air here but I cannot run most apps I want on it while that would make me buy one today. I don’t want another iPad (which I bought because it’s nice and small and great battery, but if I cannot code on it normally, what’s the point).
No, the only reason you can't run vscode is that no one has put in the effort to port it. It's a problem of financial incentives and not a problem of "fences."
"fences" is definitely not the best analogy. "spikes and minefields" would be more appropriate as Apple has explicit rules against apps that compile and run code, third party extensions would also probably be prohibited, and the terminal would have little use.
At the end of the day what's possible under the current rules aren't that different from just running it in Safari, so why bother ?
Edit: Desktop software can be ported to other operating systems. Just because an operating system can't run a different, desktop operating system's software that doesn't mean it can't run desktop software. The CPU is used in iPads too. It is used between 3 different form factors.
Only the ‘shell’; not all the rest that make it practical. There are a lot of blog posts (a yearly one here) of people trying to code on iPads; they all end badly because Apple allows nothing. It’s fenched off. Nothing to do with lack of incentive to port Xcode; there are plenty of code apps on iPad, they just cannot run real envs (docker, anything other than toy interpreters etc) without rooting.
It is a new operating system with a different api and security model. Binaries on one operating system with the same processor does not necessarily run if you run it on another operating system using the same hardware.