Gygax’s primary concern was creating a fun and playable game, not recreating or simulating pre-existing works of fiction, so everything in D&D is filtered through that lens and distorted from whatever inspired it. D&D thieves find and remove traps and pick locks because those are useful skills in a D&D dungeon (moreso than picking pockets, which is more of a flavor thing). Hobbits are good thieves in D&D because of Bilbo but they’re better at it than Bilbo because the premise of the game is that PCs are “professional adventurers” who do this stuff repeatedly and are good at it, not regular folks in over their heads who have one adventure and retire (and also because hobbits need to be good at something to be a viable character type).
The game-structure of D&D dictates that characters all start out relatively weak but gradually power-up, that they have limited/siloed skill-sets so they’re encouraged to work as a team of equals (rather than solo or one main guy with minor sidekicks), and so on, so every character type lifted from a fictional source is modified to fit that paradigm. D&D characters (and monsters and spells and magic items) are drawn from and inspired by fiction and mythology and history, and are intended to resonate and remind you of that source material, but it’s all in the context of the game-structure first and foremost: a team of professional adventurers making repeated forays into dangerous underground mazes and untamed wildernesses in order to fight a variety of exotic monsters and recover treasure and gradually increasing in power (allowing them to fight more dangerous monsters and gather more valuable treasure) in an endless feedback loop.
No pre-existing work of fiction has that structure (because it wouldn't make for very good fiction) so no work of fiction is exactly like D&D and Gygax knew that, which is why he always stressed that D&D should be looked at as a game, not a simulation. But it’s a game with echoes and resonances to a bunch of other stuff, which is one of the things that makes it so compelling and addictive. You’re character isn’t literally Conan or Elric or Bilbo or Sir Lancelot or John Carter, but they’re recognizably connected to them - enough to make it feel like the adventures you’re having are similar to the ones they had (but more open-ended, and shared with friends).
The game-structure of D&D dictates that characters all start out relatively weak but gradually power-up, that they have limited/siloed skill-sets so they’re encouraged to work as a team of equals (rather than solo or one main guy with minor sidekicks), and so on, so every character type lifted from a fictional source is modified to fit that paradigm. D&D characters (and monsters and spells and magic items) are drawn from and inspired by fiction and mythology and history, and are intended to resonate and remind you of that source material, but it’s all in the context of the game-structure first and foremost: a team of professional adventurers making repeated forays into dangerous underground mazes and untamed wildernesses in order to fight a variety of exotic monsters and recover treasure and gradually increasing in power (allowing them to fight more dangerous monsters and gather more valuable treasure) in an endless feedback loop.
No pre-existing work of fiction has that structure (because it wouldn't make for very good fiction) so no work of fiction is exactly like D&D and Gygax knew that, which is why he always stressed that D&D should be looked at as a game, not a simulation. But it’s a game with echoes and resonances to a bunch of other stuff, which is one of the things that makes it so compelling and addictive. You’re character isn’t literally Conan or Elric or Bilbo or Sir Lancelot or John Carter, but they’re recognizably connected to them - enough to make it feel like the adventures you’re having are similar to the ones they had (but more open-ended, and shared with friends).