His logic is that when you are doing research, you are pushing the envelope into new territory that can't be taught in a classroom. When you are in a classroom you are learning old material that is already well-known and established.
This is very true in CS. But far from true in Math and Physics where there probably is a lot of advanced learning available in classes. The few classes I had that he actually endorsed being "worth your time" were Math classes focused around encryption (of which I took 3 different ones).
But my advisor was unique because he was 100% there for the research. He only taught because the university forced him to. He lived and breathed research and that was the only reason he was in academia. He was truly passionate and worked 10+ hours a day on research, but thats why he was there. He had a very low opinion of classroom teaching.
At least in the poor (and honestly mostly useless) parts of Mathematics. Maybe Physics is less poor.
(Fortunately I was in CS, where the research output is actually needed by society and usually not pure masturbation, so the attitude toward coursework was "do well at what you need, enjoy what you want, and ignore what you don't need or want"
Then again, knowing that that @£&$€¥ would drop you might make it a good plan.