Los Angeles, which was originally “LA”, and Birmingham, which was once just “BH”, had to follow suit; so, to make things easier, lots of airports just filled in the gap with an “X”, a “filler letter”.
Article source: https://www.huffingtonpost.co.uk/entry/airport-codes-x-los-angeles_uk_6a2808a6e4b0d7105b0d1beb