A movie is first and foremost a story. While real life is not known for always making sense, it's different for movies. The viewer expects a movie to make sense... For everything in the story to make sense within the framework of the story.
Everything from props to setting to costume to plot. They all there to augment story. Let's take for our example the movie Strangers on a Train (1951).
The movie revolves around a murder plot. When you first meet the murder victim, we see her wearing glasses. Now, she's not your stereotypical bookish librarian by any stretch of the imagination. Actually, she's portrayed as just the opposite. Which makes the choice of having her wear thick glasses seem odd.
But it's no mistake. Those glasses play their own part in the story. First as a tool of the filmmaker in showing the murder (see photo); but later also -- and more importantly -- in the party scene (won't give the story away here; watch the movie).
So, when a script is still in the writing stage, the screenwriter must keep all these details in mind. One change can very well affect the rest of the movie. Change a plot point on page 10 and you may have a problem on page 79. (Get rid of those glasses, and you have to fix the later scenes.)
The fictional world of the story must be internally consistent. A plot hole could very well break the spell of the story.