No amount of human diligence or testing is sufficient to prevent all possible bugs.
This is a common belief, but I don’t think it’s true. Human diligence is capable of conclusively proving the correctness of mathematical and logical theorems, why shouldn’t it be capable of proving the correctness of algorithms?
As you say further down, the real problem is not that bug-free code is inherently impossible, but that our programming languages are not designed to produce it. We design for a few cases that we’re planning for, and cases we don’t think of “fall through” and cause chains of problems elsewhere. Constraint-based mathematical programming languages would inherently require us to define the behavior for every case or they would fail to build.
The Halting Problem does not say “It’s impossible to prove whether a program halts or not.” It says “There exists a set of programs, for which it is impossible to prove whether they halt or not.” Most everyday programs are not in this set.