Now this is a very interesting question and I think it totally depends on the fanfic in question. I believe there are four ways that you can come up with a decent original fiction from a fanfic without infringing copyright:
- The premise is so generic, i.e. two cops solving a case, that if you change the names and alter the situation slightly no one is going to know it wasn't an original fic anyway.
- You've written an alternative universe fic so changing the names and tweaking some of the minor characters gives you a whole new playground.
- You've added something new to the fictional universe that can be extracted and it might take work, but the original parts and some tweaks to the characters make it completely original.
- You've written real person fanfic (RPF) and a few tweaks and name changes mean you can pretend they never were real people.
Of course there is the question of should you file off the serial numbers and, personally, I don't see anything wrong with it as long as you're not taking anyone's copyrighted material with you. However, I firmly believe it should be done well. Converting a fanfic into an original fiction can be as hard as writing the original fiction from scratch. It should be undertaken carefully, thoughtfully and only after serious consideration. In some cases it might even be easier to take the premise and simply write the original fiction from scratch in the first place.
I have books out there that started off as a fanfic ideas, but which I then wrote as original fiction. Two of them were RPF so I simply fictionalised the characters before I started writing and one I had started writing as fanfic, but it had so much original material in it that it barely resembled the universe it was set in, so I ripped out all the fanfic parts and wrote it as a completely new idea.
I also have one that was published as a fanfic, but it fits in category four and I took it down a long while ago and have just about finished converting it. I also added some large chunks because fanfic assumes the audience know things that original fiction cannot. Since werewolves don't happen in real life I don't think many will catch on that it used to be RPF.
Now if you look as something like 50 Shades I think it fits into category 2. Even though it was once a Twilight fanfic it was an AU so, love it or hate it, by changing the names it's an original story.
The problems arise when the serial numbers aren't filed off very well. Fanfic writing in most cases has different requirements because of the audience and original fiction usually needs a lot more world building. If this is missing or too much of someone else's fiction universe is used you end up with a book that is thin or cheating. This is problematic for the reader and the copyright owner.
There's no such thing as a completely original plot or even an original universe, but there are distinctive things that make a fiction universe special. Having wizards use wands is not unique, having them going to a shop in a magical street where a funny old man hands them wand after wand until they find the right one is. Letting your heroine be bitten by a handsome vampire is not unique, having him be the guy next door who fixes up old houses and your heroine is the girlfriend of the teenage boy watching said vampire from his bedroom window is. Harry Potter and Fright Night (1985) respectively; in case you were wondering.
It's all in the delivery. Two fanfic writer can use the same premise and come up with entirely different stories, so it's quite possible for two writers of original fiction to do the same. As long as you bring something different, something original to what you are creating then who cares how it started out. Write well and don't steal other people's universes for your own gain and everything should be fine.