How much of this comes as an emergent quality of class-based gaming?
Eh, I wouldn't say much. People like archetypes and roleplaying an archetype is fun and easy.
Yes, classes/archetypes are not the issue.
IMHO, it has mainly to do with these:
1: D&Ds combat norm of 'balanced encounters' + HP bloat = Combat is fun, not dangerous. Risk of death is actually rather minimal after a few levels. And as PCs only get 'level appropriate' enemies, it cultivates a sense of 'we can kill anything' amongst long time players. Yes there can be consequences for combat but death is usually not one of them. And once the PCs get to higher levels the magic users have an app for that as well.
2: The RenFaire / Wild West social assumptions of many D&D settings. Social class is basically not a thing in D&D. In fairness it has kind of been that way since the beginning of the game. But along with the way combat typically plays out, it does seem foster among some players a bit of a:
"Just try me bitch. I dare you!" attitude whether they are talking to a back alley assassin, or a King...