Granted, I think we could better point to Dungeon of the Mad Mage for a better representation of dwarves. Granted, they don't appear as NPC's all that often, but, that's not really the issue. You seem focused solely on NPC's. I'm talking about how the race is presented across the material. An empty dwarven mine for an adventuring site is still adding to dwarf information in the game. It's presenting where dwarves used to live, even if they don't live there now, and presumably adding to the history of dwarves in the setting.
See, here's your problems:
1: You assume that everyone should or already does slavishly follow the published splatbooks adventures in determining how their world is structured and how the races are presented in their world.
2: You think having an empty adventure location (i.e., one where the PCs are expected to go forth and kill things and steal stuff, not one where PCs actually live) is somehow superior to saying that there are living towns full of living people all over the place
or references to equally interesting things that aren't mapped out, like a halfling pirate.
So let's deal with this.
First off, yes, there are people who run directly from the books and assume everything in them is canon and world-changing. That annoys the heck out of me, which is why I'm hoping that, should WotC produce Planescape for 5e, they ignore the Faction Wars.
But there's also lots of people who don't run directly from the published adventures and ignore parts, make substitutions, or just grab interesting sections and ignore the rest--or who don't run from published adventures at all.
Secondly, what interesting lore does either STK or DotMM add to dwarfs? I will admit I'm not reading them
too carefully, on the off-chance I might play through them one day. But here's what I found: a dwarf mine that has been taken over by monsters; a dwarf brewery that has been taken over by monsters; a dwarf stonecarving hall that has been taken over by monsters. A level of the dungeon that I think was made by dwarfs but I can't really tell and anyway it has been taken over by monsters.
So the "dwarf information" these adventures add to the game, as far as I can tell is: dwarfs are miners, dwarfs are brewers, dwarfs are stonecarvers, dwarfs are
really bad at not preventing monsters from taking over their homes, and dwarfs can make locks that can only be opened by dwarfs.
The first three bits of info are already
really well-known and the fourth bit is giving me flashbacks to all the "fun" I had playing Dwarf Fortress. The last bit is actually interesting, but I'm not seeing anything that suggests that this is limited to dwarfs only and that no other race can make a racially-biased lock.
Unless there's some great font of information about dwarven history or mythology in those adventures that I missed and that is equally as useful in Eberron, Greyhawk, or my homebrew world as it is in the Realms, which I would never run a game in? Because I don't care if the dwarves fought against the Zhentarim or if this dwarf became a Harper when I don't use either the Zhentarim or the Harpers in my games.
Secondly... those are dead places. They exist solely for the PCs to enter and kill things. There no actual life in them. Any lore that you do find is old. There's nothing that tells you how dwarfs currently live or what they think of their lore or history.
It's not just that they lack use as NPC's, halflings lack use AT ALL. Like I said, show me an example of a halfling village in the adventures. Apparently there's one in Rime. 10 years and 14 modules in, we get to see our very first halfling village. Yeah, I'm just swimming in information. How do people keep track of this flood of knowledge?
Because we don't need the books to spell it out for us? We know what halflings are like, we know what villages are like. We can combine the two quite easily. As I showed when I described a halfling village for you, which you conveniently ignored.