If you run your game where combat is only a portion of the experience (lots of NPC interaction, exploration challenges, and so on), it might be worth it to have a character who is very good at either A) making many skill checks or B) having spells and abilities that let you sidestep having to make checks. Most 5e games I've played in have been primarily combat, but there's no reason that this needs to be the case. You could use feats to gain expertise and skill proficiencies, or multiclass to gain the right mix of abilities.
People keep saying you don't need to optimize to be good in combat in 5e. If this is true, then someone who builds to do other things could shine at the right table.
However, if someone does something like that, and someone else doesn't, simply by playing a class that's good at combat and not diluting their build with other classes (not optimizing, just not sacrificing anything), then yes, I would expect one character to perform better than the other in combat. You wouldn't even need an overpowered build to do so.
I once played at a table with a Mastermind Rogue (focused on using the Help action to assist allies) and a dual-wielding Champion Fighter. No surprise, the Champion was more effective in combat, and everyone thought their character was super good ("he crits so often!", they'd say).
Then someone joined playing a Variant Human Barbarian with Great Weapon Master, and thanks to the advantage from Savage Attacker, they blew the Champion out of the water, and suddenly people realized that the Champion actually kind of sucked, lol.
But if we weren't playing a game primarily about combat, both the Barbarian and the Fighter wouldn't be nearly as useful as the Rogue. There's a lot of factors that go into how useful or not a character is. How good do they do their thing? How useful is that thing that they do in the game overall? How well do they synergize with other players? How do their tactics line up with the enemy?
It's like in the Fireball thread. If your DM routinely uses large groups of weak enemies, and those enemies tend to clump together, and maybe your Fireball user is an Evocation Wizard who can freely drop their Fireball on the melee- Fireball is an amazing spell!
But if your DM likes "boss monsters" or have enemies who know what their doing, avoiding "fireball formation", using cover, using ranged attacks, focusing on the Wizard, then Fireball gets a lot less useful.
You can't judge a character in a vacuum, you have to take the paradigm they exist in into account.