The heart of this ancient debate comes down to the fact that most "martial"/low-magic/non-magic characters are effective in limited ways. Let's look at a level 5 Fighter (no subclass).
He is effective in that he has more hit points than most other classes, can use any weapon, wear any armor, has a minor self-heal, and can grant himself an additional action in tough battles. Like most (but not all) weapon users, he can make a second attack in combat. If enemies try to push him, knock him prone, or attack his physical body, he's somewhat more resistant, and he has a few skills that can be employed. With the right weapons, he can dual wield more effectively, increase his accuracy, ensure he never fails to deal some damage, or provide limited battlefield control to those he hits.
In contrast, the level 5 Wizard has much lower hit points, few weapons, no armor and must rely solely on magic for attack and defense. However, he enjoys several at-will cantrips, which can be seen as low damage attacks (most with built-in weapon masteries!), or provide useful utility, like torchless light or being able to grasp something from a distance. A few times per day, he can do things the Fighter cannot, such as strike multiple foes at once, control enemies, debuff enemies, buff allies, protect himself from harm, or provide even greater utility. While the number of different abilities he can use is limited, he can swap them out each day for other abilities, acquire new ones through means other than increasing his level, and even has a few spells that can be used out of combat without cost. He also has his own skills, though they tend to be different than the ones the Fighter possesses. He's slightly more resistance to things like illusions or mental influence by dearth of his saves.
Thus the Wizard is potentially more effective in more situations than the Fighter could ever hope to be. There is a tipping point, where Wizard has no limited resources remaining, and the Fighter, given enough short rests, can still be at full power, but whether or not you see that in a given adventuring day is a complete unknown.
If you're on the road, with only a few encounters on the journey, or facing a tough-fought battle in ruins infested with foes and few resting places, both classes perform very differently. The Wizard does have a few ways to mitigate their weaknesses- they could acquire scrolls which is basically more spell slots, or use rituals like Tiny Hut to ensure they can camp out in places they otherwise could not. While these have costs of their own, it's something the Fighter cannot really replicate- they can spend money and time too, but generally beyond purchasing plate, ammunition, and healing potions, there is little they can do to increase their effectiveness for those tough days.
In most games, you would rarely see any disparity. In fact, the Wizard might be seen as weak if the game doesn't require them to dig deep into their bag of tricks or affords very limited downtime. The problem comes in that if the game does regularly require the Wizard to save the day with abilities that the Fighter cannot replicate on their own, or that the Wizard does get sufficient downtime, and/or, the campaign has "game days" that require the Wizard to use few of their spell slots, they can really start to shine.
This becomes worse as the Wizard gains access to more spell slots, more spells, and higher level spells. The Fighter's abilities don't really improve in the same way. They tend to get more of what they have already, and some of their advantages, like high AC, cease to really matter as much as monsters become more lethal. That 21 AC from shield+plate+Protection style that was so great when most enemies had +4-5 to hit stops being as fantastic as enemies move into +7-9 to hit. The greater hit points stop mattering as much when those same foes start hitting with the force of a speeding truck.
This isn't to say the Wizard doesn't have those same problems- they totally do! But the difference in what they gain from advancement is (again) potentially greater.
I once postulated the scenario of defending a small town from an oncoming horde of foes. It's possible that the Wizard could do any of the following:
*scout enemy positions with Fly/Invisibility/Polymorph.
*create arms and armor for the townsfolk with Fabricate.
*create fortifications using Wall of Stone.
In contrast, the Fighter has no bespoke abilities outside of "fight good" beyond their skills. The DM could ad hoc say that they have the ability to lead men into battle or train peasants to better fight or have advanced strategic knowledge that could develop an effective strategy for the battles (and they really should!), but they cannot match the potential versatility and power of what the Wizard might do.
Now it's just as possible the Wizard can't do any of the above things, and is no more useful than a portable siege engine, but that's still a really good thing to have in this scenario, whereas, the Fighter, despite being a militant class, is actually not very good at killing large numbers of foes quickly.
There are, of course, many scenarios where the Fighter can outperform the Wizard. I'm not saying there isn't! But there can be many more where the Wizard can do things the Fighter cannot possibly attempt.
This is where the disparity lies. Again, a given game might never see it, but it's not impossible either. Especially if the Wizard can begin to exert power over the world as a whole.
There can even reach a point where a hapless DM might no longer have any ability to reign in a Wizard without invoking pure fiat if they are not careful, as Gygax warned people about in the 1e DMG. Both classes can fight monsters and have their own unique role in adventuring, but the Wizard has tools which are orthogonal to the Fighter's.
In conclusion, it's not that one class is definitively better than the other. There's a lot of factors involved, from optimization, skilled play, DM experience, and the individual scenarios in the campaign. But the number of potential times a Wizard can leave the Fighter standing there slack-jawed are staggering, even if you never see them in actual play.
If you have seen them in play, you might accept it as "this is just how the game is". But some among us feel that instead, maybe the potential ability of non-magic wielders should be increased. Maybe the Fighter should have bespoke abilities to lead and train men into battle or formulate strategies, for example.
Unfortunately, this always runs into the following roadblocks:
*People who don't see the problem and refuse to accept that it exists, or more fairly, don't think it's worth wasting effort on.
*People who don't see the problem as a problem, and are happy with the status quo. Perhaps they feel magic should be overpowered, and, well, magical!
*People who like their "Everyman hero" who doesn't possess heroic or superhuman attributes, thank you very much.
*And of course, the fact that even if you do see a problem, few people can agree on exactly how to address it.