That moves on to the second reason, which is fanfiction serves as a practice for actual writing. Now don't get me wrong, fanfiction is writing but you can't exactly call it your own, can you? Prompts does serve as help for future writing and a way to remove that writer's block and get our creative juices flowing. Alternative Universes or AU Fanfiction helps you get as creative as you can possibly be. Like really, you have a lot of creativity to think of Corporate BDSM AU for your fanfic (I'm talking about 50 Shades here).
Of course there are some cases where there really isn't a solid purpose for writing Fanfiction, such as crack or plot-what-plot (PWP) Fanfiction. Some are seriously fucked up (have you read the Hagrid x Hedwig one?) but they're really just for laughs and shouldn't be taken that seriously.
In the end, it's all good. The only harm done would be your heart due to all the feels and your vision.