Spawned by the Conan thread, I noticed that when we as gamers like to come up with D&D equivalent stats for literary heroes, we put them at a much higher level than what they've actually accomplished in the book.
There's a couple of understandable reasons.
For one thing, the character may well be the archetype a class is based on. The Grey Mouser isn't just a Thief, he inspired the class. Gandalf is one of the first 'wizards' you think of when you hear the word - Merlin is the other. It's intuitive for them to represent the full level range of the class, they embody.
For another, literary characters have the author on their side, while RPG characters need to be able to survive the vagaries of random dice rolls and player contrariness. One way to do that is jack up the levels.
Aragorn: an Urak hai was the toughest opponent. In 5e that's the equivalent to an Orc Eye of Gruumsh. CR 2.
Maybe. Or maybe not. Such things are always relative. In 3e you could have an Orc with just as many levels of barbarian or warrior or whatever as the DM felt like. In 4e the DM could use MM3 formulae or the MB to easily stat out a monster to challenge a character or whole party of a given level - and, with a little experience & art a DM could do so in any other edition, as well.
And equally troubling, IMO, is the stat inflation that goes with those characters, too - they're inevitably presented as being the very best of the best of the best, even if part of the concept for the character is that they're the everyman hero.
The same observation about having the author on your side comes to mind.

A hero, even an 'everyman hero' might always succeed when the chips are down in a story (and the story calls for it), but in an RPG he needs to have the bonuses to do so consistently.
Also, D&D classes tend to be pretty specialized, while heroes tend to be very broadly capable, and high stats can model broad competence in spite of the class system.
In Lord of the Rings Aragorn had to worry about orcs, even though he was considered one of the high race of Numenoreans and the best of them. His was the lineage of kings mixed with elf blood.
'Noble' and 'Half Elf' Ranger. Check.

But having to 'worry' about orcs doesn't make you low level. In 5e, a relatively small number of orcs, let alone an army, could whittle you down in short order if you don't have some sort of magical protection against a hail or rocks or arrows or whatever they're tossing at you, so that doesn't prevent him from being high-level. Similarly, in 4e, an Orc could be a minion able to similarly put a little hurt on even a high level character, or an arbitrarily high level Templated monster (empowered by a god or Pact or just as villainous as the PCs are heroic), or part of a 'mob' statted as a single much higher level creature. Likewise in 3e you could just give the orc warrior or PC class levels, or in later 3.5, stick him in a swarm. Prior to that, sure, needing to 'fear orcs' might've argued against being high level... Of course, Aragorn 'feared orcs' in part because he was allied with much less capable halflings, and cared about nations and peoples that could be overrun by orc armies, no matter how many orcs he might personally be able to beat down in an afternoon.
Gandalf was an angelic being robed in the flesh of a man. His race would not be available for PCs unless it was a special case. He was able to lift up a bier with a man on it with one arm in the books. Yet he too had to fear a large number of orcs and was not invincible. Yet if you made an equivalent character in previous editions of D&D, he might kill an orc army alone.
And he was a 5th-level magic user. ;P
The problem is not the characters themselves, it's the D&D system. D&D wasn't built to be realistic in nearly any way. It also doesn't mirror fiction very well.
Generally true. It is also a game, afterall, and a cooperative one. Most genre heroes go it alone or with the odd side-kick, mentor, or victim their charged with helping. D&D classes all need to contribute, and that can be hard to arrange without some heavy-handed mechanism like niche-protection.
5E is perhaps the closest edition to being able to design adventures that somewhat simulate fiction, but even 5E misses the mark, just not as wide as previous editions where high level D&D characters were more like superheroes than fictional fantasy heroes.
Fictional heroes could certainly get very 'high-powered,' mapping to high-level, but even setting that aside, high levels being problematic wouldn't keep the game from being able to model genre w/in it's 'sweet spot.'