Well as an engineer, I think we all know that manufacturing defects can creep in even after prototypes pass.
It's also the case that it's incredibly hard to test things like battery life, wifi connectivity and the effects of heavy processor workloads in a systematic way. You hope that your vendors do a good job (and I bet Microsoft's contract with Intel involves penalties for these major defects to try and incentivize Intel to handle these).
Look at the first Iphone4. How did they miss something as simple as skin contact causing significant antenna interference? Most of us hit it immediately. The answer: hardware in the real world is really hard.
Just a little bit of trivia which I found interesting -- Apple actually did not miss the antenna interference problem. They knew that it was an issue, but I guess they figured it was an acceptable tradeoff for the design they wanted.
I suspect if they knew how badly it hurt my reception (I totally lost signal and it took a long time to get back), they would be less surprised at the reaction.
That's not what I'd call a bug that "crept in". Surface Book I bought crashed unprovoked _several times a day_. That's deliberately shipping a completely faulty product that any self-respecting customer will take right back to the store. Which I did.