I'm not as familiar with American place names, but there's an obvious reason why those would have pronunciations that couldn't be spelled easily in Spanish.
"X" in Mexican might be shorthand for sharp mystery consonant.
In each of those, the “x” originates from Nahuatl where it had a sound of (or close to) English “sh”, which is also the sound “x” had (maybe still has, though I’m pretty sure there has been shift in Iberian accents/dialects since then) in certain Iberian regional accents of Spanish at the time, which is how “x” got into the Spanish spelling; it wasn't a stand-in for a mystery consonant.
Your comment is correct. As far as I know, "x" still sounds /ʃ/ in Galician, Basque and Catalan. In Spanish, it became /x/ centuries ago, and the spelling changed to J/G. Nowadays you only see the X in old-fashioned spellings like Quixote, Xerez o Ximenez.
"X" in Mexican might be shorthand for sharp mystery consonant.