I left academia after a failed postdoc because I realized I had no clue how to conduct research on my own; I didn't know how to pick good research topics, or how to manage my time, or how to find people to collaborate with, or how to collaborate productively with someone for that matter.
I'm not sure if the fault was my supervisors or mine. I'm a bit "on the spectrum" and have lots of difficulties with social interaction, but I guess so do many other people drawn to technical fields and still they manage to navigate the system somehow. I certainly never sought for any kind of mentorship because I didn't realize it was needed and, also, because it felt extremely awkward.
Also, the whole academic system seemed a bit fucked up. People do research and write papers because they have to produce something measurable, not because the research they do is actually interesting or important. I published five papers during my PhD and I would say that maybe only one of them was slightly interesting or important, and even that could have been much better. All of the papers were published in proper, highly regarded journals (mostly Physical Review). Towards the end of the PhD I started having some vague ideas of stuff that would be _actually_ interesting and more worth my time, but also more difficult and less certain results. When was I supposed to do those? I was still in the mindset that I wanted to stay in academia so I couldn't take any risks.