Coming from T213479 it seems like [[ https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/master/includes/specials/SpecialAllMessages.php#95 | default value ]] of HTMLSelectField in SpecialAllMessage is ignoredt when the submitted value (from the URL query) is not present among the options.
Visit http://localhost:8888/w/index.php/Special:AllMessages?lang=zzzzz
Expected: the 'default' value should be selected (en), rather than the first value (aa) if overridden by the URL query value (zz).
Developer notes
I will note that this behavior is the same for OOUI and non-OOUI HTMLForm, and that is has been the same basically forever. But maybe it would make sense to change it.
If you want to change this, I think the way to do it would be to implement an override for HTMLSelectField::loadDataFromRequest() that pretends the value was not submitted if it is not one of the available options.