The wizard has the biggest selection of spells. Granted, but....
You handwave that as if it is trivial. A 5th level sorcerer gets to know 6 spells total, spread over 3 levels.
A 5th level wizard will know *at least* 14 spells, and probably many many more if they can grab some scrolls or a spellbook.
Not only do they get to 'know' more spells, but they can choose them from a much larger variety. What sorcerer is going to 'waste' a known spell on Feather Fall or Jump. But they can be *very* useful to a wizard. And a Warlock doesn't even get the option.
Wizards automatically get Ritual spells, again very useful.
And if you can't see how the wizard subclasses can be very useful.... you don't have any imagination. Yes Elemental Affinity is great, and painfully straightforward; but abjuration lets a wizard tank (And recharge for free with alarm ritual) then you get improved counterspell, and spell resistance.
Conjuration lets you make stuff out of thin air, or swap places; Divination gives you portent.... the list goes on and on.
And that is *on top* of the huge spell selection you can tailor to the environment and likely encounters. How many sorcerers or warlocks are going to have water breathing, or spider climb, or Leomunds tiny hut, or......