Crumple zones
Older cars were built strong with lots of metal and reinforced welds. The thought that building every part strong so it wouldn’t break turned out to be a bad idea.
In an accident, something has to give. All that energy has to go somewhere. With a rigid frame—and mostly hollow interior—the area that usually collapsed was the passenger space. Combine that with a lack of other safety features, accidents used to be much more dangerous for the people than the cars.
Newer cars have intentional weaknesses in the front and rear known as crumple zones. This makes sure the rigid passenger compartment is the last thing to collapse.
Writing software and building systems need similar intentional weaknesses to make sure the most important components and critical functionality is protected. Sometimes, you can predict how systems will fail. Other times you have to discover failures in action.
The car industry does this by building test cars, crash test dummies, and lots of instrumentation (e.g. sensors, high speed cameras). The software industry does this with trial an error, test environments, and debuggers.