They've created a story with a built-in revolving cast of characters that has continued to appeal to the masses for multiple generations.
I'm not sure that the fan mania over Doctor Who has as much to do with the clever, yet sometimes cheesy story lines, or the superb casting and riveting, attractively interesting characters, although as a shameless Who devotee I enjoy all these elements. It occurs to me that there might be something subtler at work. There are some elements of our ancient belief system that have informed the writers of the series, and this is the reason I believe we 'get it'.
EVIL
There is evil afoot in the Doctors's Universe. The bad guys are many: from human fears personified as doll-monsters, hideous figures with terrifying piranha-like teeth for faces, statues that come to life only when you're not looking, walking snowmen, to the Daleks, super robotic machines whose only goal is to "exterminate" the Doctor and all he stands for. I'll spare you the pedantic parallels.
SPACE AND TIME
The Doctor flies through the universe as a reincarnating (read resurrecting)Time Lord in a machine called the Tardis. It is labelled, ironically? as a police call box painted a royal shade of blue. When a new character discovers the Tardis they often remark in surprise, "It's bigger on the inside!" The idea that there must be more than the here and now creates the most puzzling mystery for all of mankind (almost as puzzling as the actual identity and name of the Doctor). We are trapped in time and space, yet we instinctively "know", or at least we hope there is more to both time and space than we have heretofore been able to fully understand. Oh, and did I mention that the Doctor knows the future? I promised to spare you the parallels but I can't help myself.
RESCUE
The concept of rescue and or redemption strikes at the heart of all good narratives. It forms the basis of every hero figures' main purpose. We love a hero almost as much as we identify with the victim figure. In every episode the Doctor saves someone.
MYSTERIOUS / MISTAKEN IDENTITY
The fact that he is a rescuer certainly doesn't mean that all relations with the Doctor are warm and fuzzy. We don't even know his real name, and when he morphs into the new Doctor, the physical form is new and unfamiliar. He is often percieved as harsh and unfeeling, devoid of mercy and love just before he saves the day, often sacrificing himself in some way. "Is he mad or is he right?" his followers ask, and as one exasperated companion of the Doctor observes, "He'll get us out of here. The difficult part is not killing him before he can."
He is the ultimate savior type, even though in some episodes we are not sure that he will prove trustworthy or that he will be capable of coming through, there is no doubt that we want him to. Danger, peril, even death and suffering run rampant, especially when the Doctor is around. But one thing is clear. He is not called the Doctor for nothing.