I think it's because of the lack of feedback. Humans also can't do much without feedback. E.g. I doubt most people could write 100 lines of code that works first time without even compiling it once.
Even more extreme than that, if you were working on a large code base where compiling it took forever, or you needed to rely on a very slow CI pipeline, it became very important to git gud and write shit that worked first time in order to deliver when promised. I'd argue if you've never had one of those moments where you sunk a bunch of time into some changes and it all compiled/worked flawlessly the first time, you're missing out.
Indeed. I wonder how much AI will do in industries with longer feedback loops that are much noisier. I think the field of software is a unique field in that sense.
It was much more inefficient, because it's easier to find bugs after compiling or running the code. But it is perfectly possible.