Hi Pat,
The resistor is there for the same reason that car/motor ignition systems use resistive leads to the spark plug. The resistor greatly reduces radio frequency interference from the spark.
In the very early days of radio transmission transmitters used spark gaps to generate radio waves. Because this was the only transmitting technology of the time, Samuel Morse invented the Morse Code.