Despite some of its trappings, D&D has virtually nothing to do with history. Partly, this is due to the presence of magic. Mostly, though, it's because D&D is played almost exclusively by modern Western players.
Definitely agreed, but I think even most of said players realize this world they were in doesn't run the way modern Western society does. It may not run the way medieval/renaissance society does, either, but the smaller and far less even role of the rule of law is one place where they line up a bit more.
Underneath it all, humans are humans, and appeasing people more powerful than you is generally easier and, in the short term at least, far smarter, than confronting them or otherwise trying to "put them in their place".
Of course one should mention the good old "Be nice to the adventurers whilst one guy rides off to tell the local lord and see if he wants to send anyone to 'deal' with them or not"!
I don't actually agree re: "most tables" being unable to wipe the modernity from their eyes. My experience is the contrary. "Most" tables I've played at
largely can. Obviously some is intentionally retained (less racism, sexism, societal creepiness in general, etc.), but my experience is that 8/10 D&D players loved history at school, regularly read history books, and/or the better class of fantasy/historical novels, and have a much firmer grasp on "the past was different" than the average reasonably intelligent person.
The exceptions I have seen were all people whose eyes glaze over when history is mentioned, and kids who just don't know much history. I've seen such tables, esp. when I was younger, and if D&D was super-super-mainstream like WoW, I'd totally buy "most", but it isn't, and my experience is that "most" tables are fairly okay at this. YMMV etc.!