Fan fiction is the literary equivalent of the game mod. It’s user-created content.
Fan fiction lets you play in somebody else’s sandbox. It’s also a good way to practice your writing, since the characters have already been made.
For some (a very small some), it’s a test of skill: how close can I get to the writer’s style?
Some people think that the story would have been better with a few changes. And I’m sure we’ve all read a book or watched a movie and didn’t like the way that it ended.
For some, it’s a way to connect with the story.
Most authors don’t mind fan fiction (free publicity, ya know?), and some actually encourage it. C. S. Lewis went on record as suggesting that the millennia that his Chronicles of Narnia did not chronicle could be supplemented by fans.
Some fanfic (and we’re talking about a very small percentage) actually eclipses the original author’s work, through raw skill, not having to worry about appealing to the public, or what have you.
Crossover fanfiction lets you do amusing things like staff the bridge of the Enterprise with the Gilligan’s Island cast.