(CNN) -- Screenwriter William Goldman has written some of the most famous lines in movie history.
You know the ones. "My name is Inigo Montoya. You killed my father. Prepare to die" from "The Princess Bride." "Is it safe?" from "Marathon Man." "Follow the money" from "All the President's Men." "Think ya used enough dynamite there, Butch?" from "Butch Cassidy and the Sundance Kid."
He's won two Oscars, two Edgars, a Hugo and a career achievement award from the National Board of Review. He obviously knows how to write.
And he still has no idea why some of his dialogue manages to become part of the national vernacular.
There are so many factors that go into creating a movie, he says, that it's all a writer can do to get his script right.
"When you're doing a movie you have no idea who the powers on the movie are going to be, and is there going to be a star who wants this line or doesn't like that line. You're at the mercy of everybody and you do the best you can," he says. "But you never know."
(It's no wonder that another of Goldman's most famous lines is his summation of Hollywood: "Nobody knows anything.")
If you're a screenwriter, it's not exactly something you can plan. Maybe the actor gives a line a poor spin; maybe the director doesn't capture the moment; maybe the film editor changes the rhythm of the scene in the cutting room. It's been said that nobody plans to make a bad film, but with so many variables at play, even a good script isn't bulletproof.
Fred Shapiro, editor of "The Yale Book of Quotations" and several other books in the field, points out that movie quotations can be a shorthand -- something that brings up powerful associations.
"Some movie quotes become popular because they evoke a great film, or a great scene, or a great actor," he says. "Sometimes the words of the quote become proverbial -- something like 'The natives are restless' or 'If you build it they will come' or 'Win one for the Gipper!' They enter into the language."
He also notes that lines tend to get condensed or changed. For example, he was quick to point out that the correct quotation from "Field of Dreams" is "If you build it, he will come."
They're also social glue. Repeat a line from popular comedies such as "Airplane!" or "Monty Python and the Holy Grail," and you can immediately establish bonds with similarly minded individuals. This summer Marvel fans have been fond of repeating, "I am Groot."
The late Harold Ramis was a champ at composing such wisecracks, anti-establishment jokes that have been repeated by generations of viewers.
During the Oscars, Pepsi even promoted its "mini can" with a commercial that featured only well-known movie quotations. Why that strategy? "We want to take this to an emotional place," Seth Kaufman, PepsiCo's VP-marketing for colas, told Advertising Age.
Shapiro makes a distinction between popular quotations and catchphrases. The latter is more of a trademark, he says -- Bugs Bunny's "What's up, doc?", for example -- and incessantly repeated. They're often even said in the voice of the performer. It's hard to say "Make my day" without evoking Clint Eastwood's clenched-jaw delivery.
These days, thanks to repeated television showings, video streaming and the Internet, quotations attach themselves to our craniums more quickly than ever.
Ironically, that means the person who wrote the immortal line is now more ignored than ever. Think about Goldman's classics: Who do you think of, the actor or the writer?
"Nobody cares about who the screenwriter is," Goldman says. "That's one of the things you have to deal with if you write a screenplay. Nobody has the least knowledge of what's going to work, and everybody wants Tom Cruise."