Why do we have attack cantrips in the first place? I mean, 5e is built so that your Wizard could throw darts or plunk things with crossbows just as effectively as anyone else with proficiency and a decent stat to use them. And it's not like Dexterity isn't something most Wizards want.
They exist, primarily, so that players of spellcasters can feel like they're doing magic stuff all the time. By giving the player a "spell attack" that's as effective as using a weapon, or a "spell torch" that's as effective as a real light source, it sells the class fantasy.
I could hold a torch or lantern in one hand as a Wizard because I don't normally need to use both hands to walk around and cast magic. But that doesn't sell the bit, it doesn't make me feel as much a Wizard as being able to go "behold, rubes! You with your primitive burning sticks! Witness my power, that allows me to create a superior light source that is infinitely renewable and hands free!".
So enter a cantrip that lets you make weapon attacks. Why would you use it over a spell attack, which doesn't require any gold investment or inventory space, if there wasn't some advantage to using it?