At a high level, it's two things: 1) A toolkit for a breadth of settings and 2) An approachable, large-grain system. Let me unpack that a bit:
1) Toolkit for a breadth of settings
D&D has lists. Lists of spells. Lists of classes. Lists of races. Lists of feats. Lists of magic items. Lists -- tomes, even -- of monsters. Heck, first edition even had lists of colors, smells, and freaking furniture. No setting has to use them all. In fact, I'd say most settings would benefit from being selective in how they mine the books, but that's an aesthetic. By mostly just mixing and matching from the menu, you can get Greyhawk, Forgotten Realms, Dark Sun, DragonLance, Eberron, Ravenloft, Kara Tur, Planescape, Spelljammer, and any number of others. Those settings are all stand-alone and do not require or imply any tie to the others. You can tie them together, but I'd argue that's just a matter of using Planescape, Spelljammer, or a homebrew setting in a similar vein.
D&D lets you pick up the core books and immediately start building your own setting. I know this because that's what hooked me as a 10 year old punk in the early 1980s. There really isn't any other system that provides the tools for doing that. Things like Hero or GURPS have the mechanical wherewithal to create anything, but little is ready made. Fate and Savage Worlds are similar, but lighter weight. Shadowrun, Star Wars, and a number of others have had almost as many crunchy books published as D&D, but the lists are all tied into their dedicated settings.
2) Approachable, large-grained system
D&D is easy to play. You've always been able to hand a new player a human fighter (standard human champion, in 5E) and turn them loose with 15 minutes of explanation. You can make convoluted characters, but the basics are straightforward enough to hit the ground running. It owes a lot of the approachability to the large-grained system. So, what do I mean by that?
What do hit points mean? How about armor class? If AC determines how hard you are to hit, why do most folks say that hit points aren't just the ability to take damage? If HP includes things like near misses, why do we need AC? It doesn't make sense. But, it doesn't matter. Many of the concepts are mechanically as gross (large, not icky) as building with Minecraft.
Anyone who has ever played in a point-based game knows that there's no way a class and level based game can compete for customizing your character. Again, it doesn't matter because most players show up to, you know, play. Many of them have a character "type" and don't mind having their 14 barbarian in a row, other than that one strength-based ranger. The levels, classes, HP, AC, even the six stats all factor into the large-grained nature of the game. It's a feature, not a bug.
The specific configuration of those large grains are a mix of taste and feature. Skills didn't used to be a thing. Now they are. Clearly, they aren't definitive for "what is D&D". I don't think that barbarian adds value to the game, as a class. Others love it. Some sick bastards want to ditch the 3-18 range in ability scores. I think that's a crime, but 2E Dark Sun wasn't "not D&D" just because they used 5d4, so who knows.