Interesting question.
To be specific, I think that there are two ways of viewing this.
First, there is the dominance of WoTC 5e D&D. That's one topic.
Then, there is the dominance of "D&D" construed more broadly.
D&D, IMO, is not just WoTC 5e D&D. It's also all the prior editions of D&D. It's all the OSR games and retroclones that try to recreate the "D&D" experience. It's all the OGL versions of D&D that try to re-create D&D, but make it either more simple or more complex (see, e.g., Level Up). It's Pathfinder and arguably PF2 which use the common tropes and accepted play of D&D. Heck, it might also include games that have completely different a priori playing styles but still seek to mimic essential aspect of D&D (see, e.g, Dungeon World). Viewed through that lens, D&D is not just dominant. It's ... well, really really dominant.
Therefore, you are presented with a more interesting issue. Looked at one way, this is simply that a specific edition of a specific game from a specific company is dominant.
Looked at another way, this is a question of why there is an essential gestalt that is prevalent within the TTRPG community that is dominant.
To me, the second issue is actually more interesting. Because it raises questions that are more fundamental- about the prevalence of fantasy in TTRPGs. About the presence (and appeal) of a certain style of play. And, of course, about the presence and acceptance of "D&Disms" within the broader hobby.