Many of those spells aren't great this edition and are available to sorcerers. Additionally, wizards don't take "what if" spells because they only learn so many spells per level and a higher priority on spells to add that are more commonly useful. Most of those "what if" spells added are found and there's no significant difference between someone casting it from a found scroll like a wizard might have used or taking ritual caster for the same abilities.
There is no assumed or required class in the rules; that's a situation DM's create.
Wizards still have more spells known, so they do have more leeway to cover edge cases, but mostly its their ritual magic, rivalled only by tomelocks, that lets them cover these "what if" scenarios. And if they
really know they're going to need a certain edge spell, they can go out and get it, which is not an option for sorcerers. Sorcerers get pigeonholed into picking the best, and only the absolute best, spells they can get. The sorcerer's already pruned spell list might as well be cut in half, because many simply aren't good enough to even consider, while a wizard might chance upon them, copy them into the spellbook and choose to prepare them on a special occasion.
One of the things I like about the new sorcerer subclasses with domain spells is that pretty much every domain comes with some of these edge case spells, whether you want them or not. They'll feel like dead weight right up until that time they come in super handy.
But yeah, I agree with you. DMs shouldn't create a scenario where a particular spell or ability is absolutely necessary, even a really common one, like Fly. Perhaps make the party pay a price for an ability's absence, like a perilous climb, for example, but there needs to be another way to solve a given problem.
If there's a virtue to taking a sorcerer on your team over a wizard, it's that the sorcerer will let the skill monster rogues and bards do what they're good at just to free up known spells, rather than competing by taking Charm, Knock, Disguise Self, Spider Climb, Invisibility, etc.