But that's with a cantrip. The wizard still has higher-level spells. Sure, that's only a handful of uses per day, but they're able to do a lot more damage with them, so that a combat that would take a fighter many rounds worth of successful attacks could very well be over in just one action taken by the wizard. And unlike a fighter, this ability extends to killing even more powerful creatures. A fighter can hack away at powerful monster over the course of several rounds, but there's a much better chance that a spellcaster can kill or very seriously injure the same creature in a single turn.
It's one of those "anything you can do, I can do better" things. A spellcaster has so many options as to how they kill things and, as it is, fighters don't--unless they have a more magical archetype. They can use their weapon, or they can use a different weapon. In Level Up, they have martial maneuvers to give more options, but in base D&D, only the Battlemaster, or someone who takes that feat that lets them have Battlemaster maneuvers, has anything like that. Although I understand why the Battlemaster isn't the basic fighter package, I wish it had been.