I used to write fan fiction. Sneer if you wish, I don't care. Mark Twain's book, "A Connecticut Yankee In King Arthur's Court," was a blatant piece of fan fiction and he openly acknowledged it as such. If it was good enough for Mark Twain, it's good enough for me.
There is a long history of debate about the subject of derivative works. Many people object to them on principle. Given the ongoing avalanche of reboots, revivals, sequels, remakes, and reprints that are flooding the current American entertainment market, I suspect that the percentage of people who think that way is shrinking.
Captain America, Thor, and similar movies have recently made a whopping pile of money. I strongly suspect that before the trend is over, every comic book superhero ever published will have at least one movie made about them. I also confidently predict that Blade, the death defying dhampir vampire hunter extraordinaire, will soon have a remake/revival/reboot on the screen. You read it here first. Or maybe not, but you read it here, anyway.
I defy anyone to tell me that a 'reboot' of a canceled series is anything in the world but sanctioned fan fiction that someone is getting paid for. The recent Star Trek reboot (shudder) although bearing only the most scant resemblance to the original series still made a staggering amount of coin.
There is a lot to be learned by writing fan fiction. One of its most valuable aspects is the immediate feedback that you get. Many sites, for example fanfiction.net, allow you to post stories one chapter at at time. Anyone reading it can post a comment, either anonymously or with their user name attached. If they like it, you will feel that warm and fuzzy that encourages further effort. If they don't like it, you will lose hide. Serious chunks of hide, because those people do not mince words. But along with the standard insults and curse words, you will usually find thoughtful and helpful comments that you can take to heart and use to improve.
You won't get much experience at world building, unless you really go out in left field with it. The world, or city, or small town, or spaceship, or whatever is already in place and you mess with it at your peril. But if you really want to write a story that people will enjoy reading (and if you don't care about that, quit writing and turn on the tv) you will learn a lot about the details of keeping a plot internally consistent.
Remember that the people who read these stories are comparing them to the professionally written episodes that they saw on-screen. Their standards are fairly high. Sure, you can write tripe and post it. But no one will read it or offer any comments to speak of.
You also learn how to maintain adherence to an established pattern of character behavior. If you write a story where a well-known character veers too far away from the kind of behavior that they exhibit on-screen, your readers will rise in wrath to verbally scalp you. This is very, very useful when you start writing your own stories.
Your own original characters start out as vague, shadowy figures that creep closer as your story develops. You gradually get to know them by watching them behave, getting a feel for who and what they are as you see them act and react to the stresses all around them. Eventually you have a feel for what they will and won't do in a given situation.
Then you see them jump into a new kind of situation. What will they do? What does the plot call for them to do? The two are not always compatible. When you have to choose between making a character act unnaturally, or violate the flow that you had planned out for your plot, change the plot. Either that, or have a different character do what the plot calls for.
Every story (as opposed to vignettes and character studies and travelogues) is, in essence, a simple case of "Once upon a time, something happened to someone and this is what became of it." Once upon a time, two people met and this is what happened. Once upon a time, two races met in space and this is what happened. Once upon a time, a meteor struck the planet and this is what happened.
Once upon a time, the character you gave birth to got placed in a situation where they had to react. This is what happened. Ultimately, every story is about the characters. Events are only important in terms of how they effect the characters. Otherwise you are writing a history book. If it's fiction, you are writing a fictional history.
To get back to fan fiction, there is something else that it can teach you. How *not* to write a Mary Sue character. Or a Gary Sue as the case may be. These are characters that represent a kind of wish fulfillment for the author. They are the character that sweeps into the middle of things with all the answers, everyone in the story loves and admires them, they have the skills to handle every problem, etc.
You have seen them, I'm sure. So have fanfiction readers. Fan stories often introduce new characters, just as new episodes introduced new characters every week. But the Mary Sue cliche is a painfully familiar phenomenon to fanfiction readers. When they encounter a Mary Sue, the crap hits the fan in heaping fistfuls. You learn how to keep your characters human and flawed. In other words, not boring.
Like anything else, you get back what you put in. Sturgeon's Law holds as true for fanfiction as for anything else. But it can be a useful way to get started, and it has one overwhelming advantage that makes it superior to passing stories back and forth in a writer's group. On a fanficiton site, you are not getting feedback from wannabe writers like yourself, who are second-guessing themselves just as much as you are. You are getting instant feedback from actual readers. The people that you are going to be selling to someday.