The character, a masked crime fighter in a purple suit, first appeared in a 1943 movie serial called "The Phantom" starring Tom Tyler. While the character is typically portrayed as a man, the movie serial played on the mystery surrounding The Phantom and the fact that he rarely showed his face, allowing the filmmakers to cast a male actor.
This was a common practice in early cinema, especially for characters who were shrouded in mystery or wore masks, as it allowed for flexibility in casting and saved on the expense of having to hire a female lead.