Because the sound of X in English is that of a vowel sound. What this means is that you pronounce it "EX", with the sound of the "E" first. Ergo, one says an "ex". It's actually logical in this case...
Wilhelm Röntgen was the one who gave them the name "X-rays", though many referred to these as "Röntgen rays" for several decades after their discovery. The presence of some unknown ray was deduced...