I routinely tell most people to take fitness/diet advice from non-specialist doctors with a large dose of circumspection. This quote puts one of my reasons perfectly:
Surprisingly, medical doctors are often seen as poor sources of dietary advice because medical schools are slow to adapt to and teach new developments in nutrition.
The other reason is that most doctors don’t stay up-to-date on developments in medicine (including those impacting fitness/diet) outside of their areas of specialisation.
So a generic doctor’s understanding of principles of fitness/diet may be way outdated – probably dating to when the syllabus was set for their time in med school.
It’s hard to ignore the doctor’s advice,
even if we strongly doubt it’s reasoning,
even if it’s on an area that’s not the doctor’s specialisation,
even if the doctor themself insists that they’re not up-to-date on the domain.
Better, do your research, go to a specialist for advice, and challenge their advice (even if to understand the reasoning) if it doesn’t match your research.