for me, fan fiction serves several purposes:
a ) practice: You can develop all sorts of skills in writing fan fiction and the existence of a pre-existing world relieves the burden of having to create one. It lets you focus more on other skills: characterization, dialogue, foreshadowing, mood, plot, etc. This was, and is, one of my main sources of for just sheer writing.
b ) development in isolation: you have a flicker of a concept and you want to figure it out more, but don't feel like just sitting down and brainstorming is enough. So you take the concept to a pre-existing setting you are already familiar with and put it down there to see how it plays. This is one of the reasons that most of my fanfictions involve the Ranma 1/2 cast, I'm so familiar with them that I can adapt their basic characters to any sort of story I want and can model reactions to a new element using them.
c ) readership research: fanfiction comes out in smaller segments than most other writing, which means it can come out quicker. Fanfiction readers are very vocal about what they like and don't like. The good ones are both vocal and explanatory. Even better are the ones that start to speculate. A careful study of comments gives you excellent insight into what sorts of constructs or plot devices produce what sort of reaction.
d ) sheer fun. I have a hard time reading a book I enjoy or watching a good show without wondering how my characters would react or be treated in such a situation. This is the reason my fanfiction is rarely as grammatically well done as my original fiction, because I'm often writing for fun not art. The fact that it is not original leaves me kind of free to just do whatever I like. Currently, for example, I'm wondering about how Michael would respond to one of my two "demonic" (well, they LOOK demonic) girls who also happen to be rather fervently devout Catholics (though one of them is also a bit like a female version of Warden Ramirez). Also thought about Dresden meeting the main character of the novel I'm working on right now, but the metaphysical differences in play are huge, so I don't think I can arrange that in a way believable for me. (the first novel wouldn't show those differences, btw)
All these are true. Fanfiction is a good place to start writing, as all the backgrounds and characters are laid out for you already. All I have to worry about is the story and the dialogue, taking the established characters and keep them true to the original while giving them my take on them. I add a few new characters of my own, and learn about the old and new interacting with each other.
I started in fanction, wrote a few, and now have moved to the next step -- Semi-pro writing in a shared universe (Battletech) While the characters are all my own, the background technology and basic sitiuations are already laid out for me. I don't have to create the universal backstory, just the backstory of the characters and the story. I'm leaning how the backstory influnces both the characters and story, what is necessary for the story and what isn't. I'm leaning how to write tight stories and making sure the scope is sufficent for the story.
After that? My own stories in the universes I create from whole cloth. I do have most of an original novel written. Its needs works and needs to be cleaned up, but it's all mine. It's the ultimate goal, but I'm not there yet. But I'm getting there.
Craig