It could be because you realize you don't really like research - that involves reading and writing a lot of papers, going to conferences not just tinkering. It could be because you had the wrong professor who failed to lead you and left you by yourself. It could be because you gave up at a low point, where most PhD student go through. It could be because after 4 or 5 years your professor keep saying "you're not ready yet" (I've seen that in humanities).
So it's not really a problem of "not being good enough", but it definitely happens.
1. Your experiment fails to produce a result after a few years of effort (my project, we don't know to this day what went wrong, and I was lucky to find a new project).
2. Loss of funding or institutional support. (A large program at my state's university pulled its support for a process that required regulatory approval, and an entire group of faculty and students all had to leave.)
3. Your advisor quits, changes jobs, gets fired, goes to prison, dies. (Many cases).
4. Your advisor holds your thesis hostage until you publish a certain number of articles (a friend of mine, she sued and won).
5. Mental health issues (high incidence of clinical depression).
6. Personal animosity between members of your committee (another friend).
How these risks instantiate themselves is that you have to start from scratch, often with a completely new research project, and finding one isn't guaranteed by your department. You are almost completely at the mercy of one person -- your advisor. There is virtually no oversight.
Most of these are factors in any employment, and I would argue things like chance of losing funding at your job is worse than academic funding threats.
How many people do you know who “failed to meet the standard”? Zero. If you do the time and work for your professors you will get the reward. There is no risk.
> PhD Envy" is a real part of office politics
The most vocal critics are not bachelor degree holders, but those who did it and had a bad experience.