I, along with better writers than myself (Neil Gaiman, J.K. Rowling, and George R.R. Martin being among the most notable), write fanfiction on occasion. In my case, writing fanfiction as a hobby is what convinced me that writing is something I want to make my career out of. However, there are other writers out there (Orson Scott Card is notorious for it, though in recent years he seems to be mellowing out a bit) who don’t recognize its importance.
Aside from being a stepping block to “real” writing, fanfiction is important for a couple of other reasons. Fanfiction allows fans to interact with characters they love, and have a certain amount of control over that interaction. Sometimes, the original author even responds to some of the fanfiction of their work, which creates positive fan to creator interaction. Not only is that good for the fandom community, but it also makes good publicity for the author’s brand.
Even established writers write fanfiction on occasion. I find it can be helpful when combating writers block. Getting back into the habit after being out of it for a while is sometimes easier when I can play around in someone else’s world for a little bit before going back to my own. Not to mention, getting into another person’s characters’ heads is almost like going into that person’s head, which allows you to not only get another perspective, but also learn to imitate another author whose work you appreciate.
After all, art is imitation, anyway.