Why do I favour practices like developer testing, TDD, refactoring and continuous integration?
It's to enable rapid & sustained evolution of *working* software.
The odds of delivering the right thing in a single pass are so remote that many iterations are likely required.
And even when we hit the bullseye, it's almost always a moving target. Not least because putting software into an environment has a tendency to change that environment and the problems we need to solve.