I feel it mostly comes from insecurity rather than from experience working with academics. Someone feels threatened by someone else having a credential they don't have so they put that person down in some way to make themselves feel better
e.g. "I didn't see the point in going to university because it's all theory and I think practice is more important", "those who can't do, teach".
> I wish that, just because I can do one type of thing well, people wouldn't jump to the conclusion that I can't also do another type of thing well. As in: Just because I understand math, please don't jump to the conclusion that I don't understand databases and can't write clean code. Just because I can see the "right way" to solve a problem, doesn't mean I can't also appreciate arguments in favor of the cost-efficient way of solving 20% of a problem if it gives you 80% of the benefit. etc. etc.
Yeah, it's a combination of insecurity, cliched thinking and gatekeeping. It's quite feasible to get to expert level at many things.
It depends on your PhD as well. Some involve no programming, some just quick prototypes, some more complex projects etc. Generalising how all PhD students must be is stupid.