I could say a lot more on this and about the decline of academic philosophy, but you get my point.
Getting a good job sounds almost blissfully easy in comparison.
Anecdotally, I have a near perfect-perfect GRE score (334/340, perfect score in quantitative), with at least avg position on other criteria (I think). I failed to get even interviews in many mid-tier US universities last year.
Yes, I know it's just an anecdote.
If you were studying creative writing and planning to go into advertising, but you graduated during a big recession and no-one was hiring? A few years of grad school might be more fun than a few years working retail, especially if mom and dad will help pay for it.
If you've finished your PhD in STEM and it didn't inspire you to follow the long path to tenure? You might fall back to industry; with luck you'll make so much money it hardly counts as falling back.
But your PhD won't just expose you to pure intellectual pursuits. You'll also see the downsides to academia. Pressure to publish or perish; anti-intellectual pressures to salami-slice your results, trade citations with friends and overstate the complexity of your work; the stilted language and awful writing of many papers; the need to go around cap in hand pursuing funding; the expectation to provide free labour to multinational publishing companies; the constant threat your competitors are fabricating or p-hacking results; and the risk you'll spend a decade 'paying your dues' in postdocs without ever earning tenure.
Sadly, this is not really the case. The job supply doesn't come anywhere close to the demand of (incredibly smart and well qualified) graduates. The vast majority who choose to stay end up as sessional instructors, with little to no hope of attaining tenure. And with each passing year as a sessional instructor, your chance of becoming a "real" professor drops substantially.
Mathematicians don't get up to p-hacking, thankfully, and while some of your issues are present, you're missing a lot of the actual issues if you manage to get on a tenure track: time on committees, shitty department politics, whiny undergrads who don't want to be in the classes they've signed up for... yeah, there's a lot of problems. But, even with all that, I'd take it over a lot of the jobs I was qualified for before uni.
Really I only did the masters because I realized I should have done a CS undergrad but didn’t want to spend 4 more years and even more 10s of K.