It's not defeatist, it's reality.
You can test, but testing does not prove an absence of bugs. It just means your tests did not reveal any. Maybe your testing is flawed, incomplete, inappropriate, biased etc.
Just saying for devs to "not write bugs" is pretty naive. Almost like saying "don't have car accidents". We don't want to have them, yet here we are. In complex environments, things happens that are sometimes outside our immediate control.