I think the proof of the pudding is in the eating and barbarian and fighter are both two of the most popular classes and consistently highly ranked. So I think your premise is incorrect based on actual game play results.
Also, “inferior” is very subjective. Fighters/barbarians might not have as many options as bards, but the ones they have are very good. Action surge? Rage?
Rage? A minor damage boost and resistance to damage for a few combats a day? A Wizard could get more benefit out of Tenser's Transformation, and that's just a silly use of a sixth level spell slot, to style on a Barbarian.
Action Surge can net you more attacks, which isn't nothing, but at level 11, just past the point most games end, you get 6 attacks in one round in one combat and then you need to take an hour nap. Maybe if you're only fighting one big enemy that's good, but it's not really fantastic for a larger fight- again, contrast and compare to, I don't know, the impact of Chain Lightning. Which again, is not even a top tier spell.
A Rogue at this level is able to consistently churn out 30 damage a turn and they have a whole host of options for other aspects of the game.
My point is simple: the ability to dish out lots of damage is something EVERY class can do. Saying "well, this class can occasionally do more damage" is all well and good, but that has a very limited utility, unless your game is nothing but an endless array of simple foes that don't require any strategy to defeat than "attack attack attack!".
The Battlemaster, for example, can deal very good damage
and aid allies, disable foes, turn misses into hits, hits into misses, and even, if you choose to do it, boost a non-combat ability check. Now that's real power.
"
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyse a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects." -Lazarus Long
Dungeons and Dragons is a dynamic game where you may have to solve puzzles, negotiate trap filled corridors, engage foes in a wide variety of different types of terrain and combats, deal with magical spells and effects, plead with Kings to lend aid to towns besieged by undead, travel to other planes, survive in the wilderness, assist in a naval battle, swim underground rivers, climb crumbling towers, sneak past patrols, and yes, on occasion fight dragons.
Every character needs to have some capacity to handle a wide variety of challenges, and the best characters can actually assist their allies in this endeavor.
The Figher is not a master of skills. Nor tactics. Nor even weapons. Yet other classes can keep up with what they do,
and offer more utility. Even the humble Barbarian might gain the ability to directly protect their allies from harm or use some spells, like Augury or Clairvoyance.
Currently, the game gives the vast majority of tools to a few classes, and then tells the rest "but hey, at least you can do damage". Except, again, every class can do damage. And more.
That people are fine with this state of affairs never fails to confuse me.