True, but I think you are kind of missing the point.
Sure, using these spells only makes the wizard a relatively poor copy of a Fighter or a Rogue (Though, a bladesinger or other concept might be able to make good use of it). And a wizard with knock, skill empowerment, mage hand and invisibility really isn't AS good as a rogue, unless they have high stats and the right feats...
But we can build these wizards to do these things.
What Thief Rogue can take the role of a wizard who clears a room with fireball or locks down enemies with web? What Champion Fighter can speak with the dead and use Arcane Eye to spy invisibly on their enemies?
Wizards can use their spells to fill the roles of fighters and rogues. Is it even possible to build a fighter or rogue who is a poor imitation of a wizard WITHOUT giving them wizard spells and spellcasting? After all, the wizard isn't getting the armor proficiencies, extra attacks, expertise, ect ect of the Rogue and Fighter, they are doing it all with THEIR resource. Spells.