Why are some PhD holders unable to become professors?
[Thanks for the clarification, it turns out to be an easy question]


  What the reasons are that some people get STEM PhDs, want a research job in academia, but end up not getting it.


Because the ratio between the number of candidates and the number of available jobs in academia makes it mathematically impossible for every candidate to get a job.

Many candidates don't even lack anything to be a good academic, it's just a very competitive job market.



[Edit to answer comments (and the last version of the question)]


  are there PhD candidates that are just not qualified to be professors (why?)?


Of course there are:


a PhD is not a diploma which makes you qualified to be an academic professor anymore, it only validates the fact that you are capable of doing research. Basically you received the training, but it doesn't automatically mean that you're good at it, let alone in the top N%* best where you get a real chance to become a professor.
even being good at doing research is by far not the only skill required to be a professor. Of course there are teaching requirements (not everybody with a PhD is interested in teaching), but there's also a range of soft skills which are recommended: social skills, public engagement, performing administrative duties, and maybe more importantly nowadays being able to attract funding. 


It's also worth noticing that very few people become professors just after the PhD, postdocs are part of the career process because that's where one can demonstrate the other skills I just mentioned. But the same applies to postdocs: even somebody who has  all the skills might not be good enough, it's a tough competition.

* "N" varies depending on many factors: discipline, country, etc.