I think "Fanfic" is sort of like "television" inasmuch as you can't really paint the entire field with one brush stroke.
Can fanfic be good for the writer? Sure. You have the opportunity to play in a world you already know, with characters you're already familiar with. In effect, the world-building's been done for you. Moreover, you have a built-in audience of fellow fans who will read your work and give you feedback. It's a great starting place, like training wheels while you learn to ride a bike. Of course, if you intend to start using your bike to commute, eventually you take off the training wheels.
Can it be flattering for the writer? Absolutely, just look in the thread above. What better compliment is there than "I love your world so much I want to tell stories in it," for a writer? (Though, of course, some fanfic authors cross a line and start saying 'the author really messed up the characters there,' usually when a relationship they were fond of doesn't turn out the way they hoped.)
Can it be trouble for the writer? Yes. A local writer I know someone send her (via snail mail, no less, as this was some years ago!) a long story they'd written involving two of her characters. In this story, her protagonist proceeded to bind, restrain, torture and rape his love interest in an extremely uncharacteristic manner. The author was horrified, and not surprisingly formed a pretty negative view of fanfic as a result. And of course, there's the infamous lawsuit involving Marion Zimmer Bradley's Darkover books, which touched off a lot of anti-fanwork sentiment as well.
And like many fan communities, there's always going to be instances of drama you can point to in the fanfic world. A personal favorite for me is someone who wrote Harry Potter fanfic and came up with their own original character they stuck into the stories. Someone else liked that character and decided to use it in /their/ fanfic. This being a tale of Drama and Woe, the first fanfic author went absolutely ballistic about their 'creative property being misappropriated,' completely ignoring the fact that they'd been 'misappropriating' J.K. Rowling's world and characters in the same way to begin with.
Point being, 'fanfic' encompasses a wide variety of things. And then there's a wider 'fan-works' community overall; sometimes the same authors who really dislike fan
fic are really thrilled to receive fan
art of their characters or settings, or to receive someone's "radio-play" style audio adaptation of their books.
There's really never going to be a single answer that even a majority of people can agree on with regards to fan-works, any more than you can say that 'all television programs are great' or 'all television programs suck.' There's just too much variety to easily label the entire field.