The problem is that those people went through their schooling being told that they were awesome and should be a professor (by people who successfully became tenured professors, and who didn't experience failure).
Then they finished school, tried to actually become a tenured professor, and found out being awesome isn't good enough. You actually have to be spectacular. So they failed, unlike their old professors who encouraged them the whole way.
So there they are. Ph.D in hand after a decade of hard work, but no tenure in sight. What would you do in their position? Find and adjunct job that's at least someone related to what you've spent your life doing? Or roll the dice again and spend thousands of dollars you don't have to go to some javascript bootcamp or something (that you'll probably fail, since you're no technical whiz kid, because you spent the last decade focusing on medieval literature)?