Most of the "useless skill trope" takes time in middle age civilization. Their mind literally goes like this:
Not common > useless
Can't use for combat > useless
And this is insane, even in a medieval setting.
At best, it might make sense in a prehistoric setting. Cavemen that barely manage to survive in a hostile environment might not realize the point of skills that don't have an immediate application to survival.
It can also work when applied specifically to combat-intensive jobs, like adventurers.
(Even then, humans developed past that point because they experimented with everything they got their hands on.)
More broadly, any society that managed past the point of immediate survival should know the benefits of non-combat skills.
Particularly in a medieval setting, would I add. Literacy for example was low at that point, so reading and writing were rare non-combat skills, yet extremely valuable.
That's why when this happens outside of adventurer parties, I end up thinking that the premise is just plain insane.
No society can develop without creating tools and shelters, growing food in a sustained way, transmitting knowledge from one generation to the next... among many other things. You know, non-combat skills. Banishing someone for having an unknown or non-combat skill is just an insane premise.
Disinheriting someone as a noble for having a "commoner" job is the most I can find believable.
And all of this is basic consideration before we get to the fact that the basic benefits of some of the skills in these fictions should be pretty obvious, even as some might not be.