As a user who has a device that classifies my language in a variant-specific way, when I visit the language switcher on the mobile web, if the variant-specific language isn't strictly represented, yet the general language is represented, I want the language switcher to prioritize the general language to the top of the language switcher, so that I don't have to scroll to find my language.
Example
As noted in T123384#2024824, suppose a user has a client side langauge of es-lx, which is Spanish in Latin America, and taps the language modal while visiting a page on EN Wikipedia. In this case if there's a Spanish translation it's in ES, not ES-LX. In this case the user ought to have ES prioritized to the top of the language listing.
This is fairly generalizable. As an example, although we may have more specifically defined interwiki links for Chinese dialects, and in which case the prioritized specific language code at the top of the prioritized list is a nice UX flourish, in the case where the interwiki coding isn't sent across the wire from the server to the client side JavaScript, it will still be nice to prioritize ZH to the top of the list.