I'd modify this a bit, since a PhD candidate is still a student, and still works under a teacher. The purpose is to learn how to produce original research, by doing it under a mentor. The mentor has some responsibility to guide the student away from making themselves so specialized and unemployable that their first research result is their last.
Now, I think that as students move up the ladder, they are afforded greater responsibility for their own careers, and greater freedom to -- frankly -- make mistakes. A PhD student should be able to figure out that a job in business might require being conversant in business. But they should also be free to master a skill that no employer cares about, with eyes-open awareness of the risk to their careers.
On the other hand, a student could also think strategically about their research project and employment prospects. I had a physics thesis project with a particular research goal, but considerable latitude as to how I could carry it out, and I steered the project through a series of obstacles that "forced" me to become demonstrably proficient in areas such as electronics and programming, which also happened to be my hobbies. In other words, I tackled a specialized problem by being a generalist.
My father gained his PhD yet was and is a generalist. He went to work in industry. Perhaps this gave me a natural role model, and a background that enabled me to manage the same transition.