Writing only happy path code as a standard practice in the space sector seems quite absurd. You won't ever achieve absolute precision and errors do happen, yet it seems like systems recover most of the time.
Recently, the antenna of Voyager 2 got misaligned, but it is expected to recover from that. That was only the last problem it encountered over its very long mission - and it managed to recover from all of those so far!
In the case the system strays outside mission success parameters then aborting could make sense. The question there looks to be if the success parameters were defined too narrowly - it sounds like an error in specification that prioritizes landing in the required area over the possibility of landing at all.
Same reason you can't program a self driving car to save a person by sacrificing a squirrel. It's just going to run over the squirrel when it didn't need to.
If Apollo 11 had followed the "happy path", they would have crashed and died.
Hubble was also the "failure path". The main mirror was flawed and had to be corrected.
Almost all space mission code only ever has the so-called 'happy path'. We rely on extremely tight mechanical and aerospace engineering tolerances to achieve that happy path.
The Hubble Space Telescope's primary mirror grinding was off by a matter of micrometres, and resulted in blurry images.
Consider all the Mars rovers. Imagine some wind gust threw the descending module off course, or a retro-rocket failed because of vibrations.
Writing code for space missions isn't like writing a CRUD app. Developers can't just teleport to a space probe millions to billions of kilometres away to rectify errors and debug running code on the fly.
For the record, the 'failure path' for Apollo 11 was to get the US President to announce to the world that the two astronauts would likely be marooned on the Moon. Apollo 13 very nearly failed, too.