Very true. When I was doing PhD in pure maths I had random people explain to me that a PhD would not necessarily give me an advantage in the job market. Like I would come to do a PhD without figuring that out.
Not specifically in pure maths, but agree I also found that a math PhD is good to have for jobs in AI, finance etc. But an equivalent industry experience might be worth the same at least.
For me, data science, quantitative finance, software engineering jobs. A large part of software development is about identifying and building abstractions to solve problems, which is also what mathematicians do. A common sentiment I've seen expressed by hiring managers is that someone with a strong math background can become very competent in a wide variety of technical fields.