The orc wasn’t a better choice though. The player happened to roll a higher int, but that had nothing to do with the choice to play an orc. If they had chosen to play a gnome, they would be a better wizard.
The only scenario I can see where some races aren’t objectively better choices for certain classes than others is one where you either determine race randomly (in which case you don’t get a choice) or if you first choose a race, then roll stats in order, then choose a class. Yes, in that case you might choose orc, end up with a high int roll, and decide to play a wizard. But if you choose your class first and then assign stats, or if you roll stats first and then choose a race, gnome will always be a better race choice for a wizard than orc.