Yeah, but did they fail to build the right things...or did they just write bad code that didn't work? I would assume the former, but you're right, it's hard to quantify.
My CEO said something the other day at an all-hands, someone asked what concerns him and he said velocity and then followed it up with not that we're moving slowly but rather he's worried we're building fast just in the wrong direction. I think this happens a lot.
I can't think of a single company that failed because they didn't have unit tests, or they chose the wrong DB. I'm sure they're out there, maybe, but it's more common you're going to fail because you built the wrong thing vs the code wasn't tested, no?