They didn't use the Roman alphabet. They used hieroglyphs. The Spanish were the ones who came up with that spelling.
Now, why did the Spanish decide that X should make a "sh" sound? I don't know, but I can guess. I don't think that the "sh" sound is present in Spanish, so they decided to use a letter that they didn't use much (or at all) to represent it: X. But in English, X inside of a word makes a "ks" sound, so when the word was read by English speakers, they said "acks-oh-lawtl".
I just pulled that out of my ass, though.
ETA: Okay, did a little research. It looks like the letter X is used in Spanish, and it used to have a "sh" sound, but it changed over time.