Languages at WordPress are not only releated to the speaking itself, they are related to the countries as well. So you have as example at spain small differences between countries. Thatswhy spainish is defined per country as examples:
es_AR -> Español/Argentina
es_BO -> Español/Bolivia
es_CL -> Español/Chile
es_ES -> Español/España
and catalan at spain is described as
ca_ES -> Сatalà/Espanya
So flags are usefull to separate it to be sure to have the correct modification per country. If you are using only short appreviations for languages (as some multi language plugins prefere but doing wrong), then you will get the wrong results. But this is the nature of your shortening and is not a problem of correct language/country handling.