I agree with Chris Rosenbluth that fanfiction is often a product of obsessive rumination on a certain series for whatever reason. However, I think fanfiction can provide a useful practice space for creative expression. Fanfiction can be a really effective way to build one's skills in creative writing, especially if one aspires to fiction. When one is interested in fiction, the ready-made environment of a particular franchise can free one up to experiment with character development in a world where rules are already established. Perhaps the most salient example of how writing fanfiction might impact a writer's development comes from an old email RPG/Collective Fanfiction site, Angels of VC Andrews (http://z3.invisionfree.com/angelsofvc/index.php). Now, bear with me, as this admission will likely be embarrassing for all of us. Once upon a time I read all the VC Andrews novels I could get my hands on. After having done so, I determined I wanted to be a writer. Fortunately for me, there was an internet RPG/Fanfiction list serve that would allow me to explore the VC Andrews world I loved so dearly. In order to become a part of the list serve, you had to select a character, take a test to determine you'd read the series in its entirety, and then you had to audition for the character. Auditions were two pages long and demonstrated a commitment to the character's personality. In addition, you had to demonstrate technical skill and the ability to craft a scene. People who failed the auditions were gently critiqued by list alumni, who then volunteered to privately review and work with the writer to get to a level they felt comfortable with before auditioning again. Fortunately I passed, and wrote as Annie Casteel for about two years. The other thing that I gleaned from a fanfiction community was the value of the deadline: members of the group were required to post at least one page of text twice a week and were penalized briefly for missed posts. In this way, fanfiction helped me to develop a respect for deadlines, because the story couldn't move forward unless your character responded. Additionally, working with other writers to build a story encouraged me to think of multiple possible scenarios, which is really important in creative writing: your ending is not always effective, and it's a good idea to consider another way the story might work. Working with other writers to build a fluid or cohesive story really forces you to think on your feet.
I could extoll the benefits of fanfiction for hours, but I'll try to wrap it up.
Despite its basis as a fanmade art, situated in a certain kind of fandom subculture, I do think that fanfiction actually might operate as a useful pedagogical tool in a variety of disciplines. In fiction and poetry, I think some of the basic tenets of fanfiction can apply to teaching creative writing. I teach English 111 and 211, and generally I seek to apply concepts of rhetoric to popular culture, because it helps my students to see the connection between what they learn in an academic setting and how they might apply that to our culture. I think you could craft all manner of assignments based on fanfiction that would help aid the teaching process in the humanities and the arts.