It's all black box experimental testing with little theory. That's why we have unit tests.
When there's a complete theory about something. You can actually build that something very accurately as a theoretical model and rely on that model as an accurate blue print for the real thing. No such theory exists for programming. The complex application you designed has no theory behind it at all.
bridge builders on the other hand first build the bridge theoretically before building the actual bridge. There's some testing but physical engineers don't rely on testing as much as programmers do.
Imagine if we built airplanes the same way we build programs. Let's pretend those airplane builders just use their gut feelings like programmers do and then those builders verify their built planes with a suite of unit tests only.
First off the cost would be insane as likely a failed unit test is a destroyed plane.
Hence why all other engineers besides software rely more on theory while software engineers rely more on the scientific method which is largely less effective.