At least at one time the math department at Princeton stated that graduate courses were introductions to research by experts in their fields, that no courses were given for preparation for the qualifying exams, and students were expected to prepare for the qualifying exams on their own.
A standard remark is -- "Learning mathematics is not a spectator sport.".
For learning math, teachers, courses, recommended text books, in high school and in good math departments in colleges and universities are necessary at least for a good start; else students will too often drift off into nonsense. So, such guidance, direction, motivation, feedback, environment, explanations, seminars, etc. are from helpful, ..., to crucial.
Still, in the end, especially after formal classes, mathematicians are essentially always "self-taught".
In K-8, the teachers were all females, really liked how the girls worked and behaved, and treated me like dirt. I learned enough anyway -- Dad really good at education monitored my progress and was satisfied.
But I was not a usual good student. Ninth grade was algebra, and it was a dream for me. Still in most ways I was still not a usual good student, but I learned the material, mostly on my own, well and got sent to a math tournament. The 10th grade with plane geometry was a big turning point: The teacher was the most offensive person I ever knew, and the subject was a total dream for me. So, no way did I want the teacher to have any credit for my learning and just ignored her, slept in class, refused to admit doing any homework, etc. In fact, I was likely the best math student she ever had: I solved a few of the hardest problems in the main part of the book then turned to the more difficult supplementary problems in the back and solved them ALL, never once missing one. I started college at a cheap place I could walk to. The math class they had me in was beneath what I'd done in high school, so a girl told me when the tests were and I showed up for those. The prof said I was the best math student he'd ever had. But starting in my sophomore year I was going to a good college with a quite good math department and didn't want to fall behind. So, I got a calculus book, taught myself, and started on sophomore calculus at in the good department. So, I've studied freshman calculus, taught it, applied it, learned much more in advanced calculus, ..., and published research, but never really took freshman calculus!
So, from the ninth grade on, I've heavily taught myself. For my Ph.D. dissertation, I identified the problem in industry, was chatting with a math prof about something else, mentioned my problem, got three words of advice, and when my plane landed I had an intuitive start on my dissertation. In my first year I took a terrific course in pure math, and independently in the following summer turned my intuitive solution into a solid one. I got essentially no direction on the dissertation research -- was "self-taught".
So, being "self-taught" is important. Still, it is crucial to have the guidance, feedback, etc. of a good college math department for at least some of the time.
And if want to have a good career in academic math research, then likely it is really important to learn from some of the best research profs, listen carefully for hints of good directions at research seminars, etc.