Two-letter icons also don’t help with alternative layouts. Flags are useful for e.g. US English vs. UK English, but are bad when a country has more than one official/widely-used language (e.g. Canada) or when multiple countries share the same keyboard language and layout.
It doesn't just use two-letter icons. The Arabic layouts show “ع”. The Hebrew layouts show “א”. The Greek layout shows “λ”. The Thai layouts show “ก”. The Canadian English layout shows “CA”, the French layout shows “FR”, the Canadian French layout shows “CA” above “CSA”, and the Swiss French layout shows “CH” above “FR”.