A friend of mine did a PhD in computer science solely and specifically so he could prove to himself that he could do a sustained, multi-year solo project and complete it. He then got a job he totally would've gotten 4 years earlier as well, with just the MSc. When asked (eg by recruiters/interviewers), he always said "because I wanted to prove to myself that I could do it" and personally I find that a very satisfying answer.
All I'm saying is, not everyone doing a PhD and then leaving academia was accidentally climbing up the wrong ladder. Some did it on purpose, just to admire the view.