Well, depending on context, country and corruption: those are the exceptions, not the rule and the engineers typically did their work as well as was possible given the constraints. They know what they know, and more importantly, they know what they do not know and they will engineer in safety factors.
Buildings and bridges collapsing, machinery exploding: those are the exceptions, not the rules.
As a rule, highways function, as a rule, bridges withstand their design loads and excess of those loads and so on.
As a rule: software is buggy, frequently crashes, hogs memory, is slow and has inconsistent user interfaces, updates will randomly break stuff and it is insecure to boot.
If you feel that software is on par with the rest of the engineering disciplines then I probably won't be able to convince you that it isn't.
But whoever designed this bridge and the foundations did a pretty good job of it:
https://www.youtube.com/watch?v=RAv-rYB5qrc
In contrast, if you look cross-eyed at your average piece of software it will misbehave in unpredictable ways.