You write your script. You measure out each word. You get the flow just right. Finally, when the spell check comes up clean, you scan everything to make sure each page contains a delicate balance of colons, semi-colons, em dashes and ellipses. You're done. Your script is a masterpiece.
You print and bind the crisp white pages, present them to the director, who has them forwarded along to the actors.
And then the lead actor throws your script in the trash.
As a writer, you like to believe you have grokked your characters better than anyone. And as a screenwriter, you're especially sensitive to lesser-than feather merchants trying to improve on what already works. Unfortunately, because the film business is political, you will usually have to choose your battles. But when a lead actor throws your script in the trash, it's time to pay attention because—guess what?—the actor has to say the lines you've written and, nine times out of ten, probably groks your character even better than you think you do.
This happened on Iron Man, in fact:
Q: Robert, is it true you threw the script against the wall a lot?
Downey Jr.: Sometimes the writers wrote stuff that was smart and cool and perfect, and other times I would go to them with ideas. By the time we got to act three I was like, I can't have this confrontation scene with Pepper: "But Pepper, can't you understand that I've changed? I've got to do right!" Unh-uh. We rewrote the scene, and I was scribbling it out on cue cards.
Gwyneth Paltrow: Robert would saunter in with his 88-liter coffee and his sunglasses, take the [pages], and literally ball them up and whip them against the wall and be like, "This is the worst scene I've ever read. We're not doing this." Robert cannot say something that he doesn't feel.
Q: How did the writers react to all that?
Downey Jr.: My thing is we should all feel free to ball each other's junk up and throw it against the wall because we're not here to serve a legal document, if you ask me. I don't care who you are or what you just won or what you just wrote. I don't think "genius" and "superhero script" belong in the same sentence. That said, those guys are awesome, and I really learned a lot. Link.
That's the right attitude, in my opinion (albeit it might have been done more diplomatically). As a screenwriter, your master is not the director, producer, or even the financier—your master is the audience. Your duty is to do the best work possible and if that means rewriting something on the fly by collaborating with a lead actor, so be it.
Anthony Simcoe, the actor playing Ka D'Argo on the sci-fi TV show Farscape, once asked series co-creator David Kemper if he would mind if Simcoe changed a line in the script. Kemper smiled and said, "Only if you make it better." Simcoe was impressed—in most TV shows, any line change would have to have been approved up and down a network's hierarchy. On Farscape, Simcoe's suggestions were approved 7 out of 10 times and when you watch the series, Simcoe's character is by far one of the most entertaining.
The point is that the (screen)writer doesn't/can't always have the best ideas, and writers should always be open to others' suggestions as opportunities to improve upon the initial concept. If you don't like the "stupidity" of outside interference, you might be happier self-publishing novels, writing for the theatre, or creating machinima.