Personally I think we should abolish this Wikidata-specific setting. We should just allow all languages in ULS (which will be the same as in https://github.com/wikimedia/language-data/blob/master/data/langdb.yaml) to be used in Wikidata (as monolingual language, label language, lemma language); wmgExtraLanguageNames (in InitialiseSettings.php) should be abolished too.
All "new language code" request should be focused on adding them to language-data
Note "https://www.wikidata.org/wiki/Wikidata:Requests_for_comment/How_to_make_new_languages_enabled_on_Wikidata" says "to add a new label language, add it to MediaWiki"; this is because of they have negative effects. However I doubt how much negative effects it have (why not kill wmgExtraLanguageNames and just use the language-data as the list of available languages). TranslateWiki explicitly don't want to support any ancient language (e.g. Avestan) but Wikidata may like it (especially lemma language is using the same set of label language plus optional -x-Qid suffix, but we clearly should use the ISO 639 code if exist, not mis-x-Qxxx).