@CptSuperlative I think you're on to something significant here!
After almost 20 years of programming, I mostly write code that works as intended the first time, but that's because I write it in small increments.
Even without test-driven development, an essential part of software development is continuously exercising every line of code to ensure it works as intended. Programming and software design are "whitebox problems"¹: we know the design and can make sure to test all paths in it.