I'd say it's the most important theme of Gloranthan RuneQuest. The game's first two editions were centred on the conflict between the pseudo-Celtic Orlanthi barbarians and the pseudo-Roman Lunar Empire. RQ's sympathies were with the Orlanthis -
Greg Stafford considered himself to be a shaman - but it doesn’t present one as Good and the other Evil.
D&D, at its most basic, is a story about the PCs travelling from a settlement into a dungeon. In the settlement equipment can be bought, hirelings recruited, information gathered, spells and hit points regained. Interactions are mostly transactional, non-violent and bounded by law. The dungeon is a place of danger and evil, but also great opportunity. Gaining information, treasure and magic items is achieved by stealth, theft, and violence. The law of the dungeon is like the "law of the jungle" – there is none.
The minimum required to run a game of D&D is, per the 1e DMG "giving them [players/PCs] a brief background, placing them in a settlement, and stating that they should prepare themselves to find and explore the dungeon/ruin they know is nearby." 1e PHB:
When you go on an adventure, you… will go to explore some underground labyrinth or area of land outdoors… Your DM will give you certain information prior to the adventure — you might have to ask questions of the local populace, or you might have heard rumors or know of legends — so your party can properly equip itself for the expedition, hire men-at-arms, and obtain mounts
In 5e the world is divided between the "civilized" PC races and the "savage and brutal... almost uniformly evil… races of goblinoids (goblins, hobgoblins, and bugbears), orcs, gnolls, lizardfolk, and kobolds."
Goblins, hobgoblins, and orcs live in "tribes". Bugbears, INT 8, survive by "raiding and hunting". "[A] goblin king or queen... is nothing more than a glorified goblin boss”. Gnolls, INT 6, are "nomadic". They "attack settlements along the frontiers and borderlands of civilization". "Gnolls rarely build permanent structures or craft anything of lasting value. They don't make weapons or armor, but scavenge such items from the corpses of their fallen victims". Lizardfolk were considered upthread. Orcs, INT 7, are "savage raiders and pillagers" who "seldom settle permanently". Kobolds, INT 8, "worship evil dragons as demigods".
The 5e barbarian provides a counter-narrative.
People of towns and cities take pride in how their civilized ways set them apart from animaIs, as if denying one's own nature was a mark of superiority. To a barbarian, though, civilization is no virtue, but a sign of weakness. The strong embrace their animal nature - keen instincts, primaI physicality, and ferocious rage.
The association between the tribal barbarian and both "animal nature" and "ferocious rage" can be criticised but the barbarian is portrayed positively, as a defender of their people. "Life in the wild places of the world is fraught with peril: rival tribes, deadly weather, and terrifying monsters. Barbarians charge headlong into that danger so that their people don't have to."
The ranger is different. This class represents not a member of a tribe but someone who lives on the frontier defending civilisation against the "savage" races and other monsters. "Warriors of the wilderness, rangers specialize in hunting the monsters that threaten the edges of civilization… a ranger's true calling is to defend the outskirts of civilization from the ravages of monsters and humanoid hordes that press in from the wild."
The druid’s position is uncertain. Some are priests of societies that still believe in the "Old Faith" but others seem to live as hermits, existing outside society altogether. "Perhaps your character lives in a society where the Old Faith still thrives, or was raised by a druid after being abandoned in the depths of a forest."
A further counter-narrative is provided by the evil urbanised monsters - drow, efreeti, mind flayers, yuan-ti - and the lich, an undead wizard that must be the product of a literate society.
5e’s counter-narrative is imo not strong enough to overcome the default game structure, as presented in 1e, and the default world structure of 5e. Therefore I conclude that D&D’s portrayal of settlements and state societies is largely positive, while its portrayal of tribes, nomads and other non-state societies is mostly negative.
Why the difference between RQ and D&D? RQ derives from the study of religion and history. D&D is based on 20th century adventure fiction.