I am always intrigued by this. I am in chip design myself. For chip designs the foundry vendor (that makes the actual chips) provides us with models of the building blocks so that we can run all kinds of simulations to predict the behavior of the circuits designed. Then when the actual chips are produced by foundry, we verify (and hope) that the chips work as we designed. Given the nature of semiconductor engineering, the models need to be very accurate and the manufacturing process needs to be extremely tightly controlled in order to produce chips that will work.
For civil engineering, the same principles should apply but the level of accuracy in the manufacturing process is completely different. During design time all building materials should be modeled so that we know how much pressure there is at any given point by the weight above it, and how much pressure the type of material chosen can withstand with some comfortable margin that the designer can be assured he/she won't get sued. But at the actual build time, do the materials used actually match the designer's expectation (which I would imagine should generally be what's accepted by the industry)? Do the cement from all vendors used conform to the strength standards required by the designer? For a large project I am sure these are all tested, but there is a lot of room in how they are tested and what is considered as passing the test, and whether the materials tested match the materials that will be used in actual construction. To me unless the procurement process is well controlled and all materials are strictly tested ahead of time, one is bound to see a large variation in the quality of the materials and in the quality of the finished product. In the end how does one ensure the structure is going to perform as designed and not have quality issues that will only show up years later? In semiconductors you can build a batch of chips and put them through high-stress testing to simulate aging then figure out your failure rate (in order to estimate your costs), but in construction you build only one product only once and there is no second chance of fixing it without incurring significant costs once it's built.
On this specific leaning tower issue, it seems like the builder chose a method that is generally accepted by the industry (not by everyone but I am sure the builder didn't invent a whole new way to build it in order to save some costs), but the method might have limitations that have never shown up before and are only exposed in certain conditions that happened to be the case in this one. If it's an issue with soil, then how does the soil engineer know that the soil deep down will behave differently from what the samples showed, or does not conform to the expected load-bearing capabilities of similar soil elsewhere? If everyone is following protocol, and it turns out that the protocol is bad, whose blame should it be?