What makes a movie good or bad isn’t the story, the plot, the actors, or the setting. What makes a good story is setting up events and then paying them off. Bad movies don’t set up events, so they appear unrealistic and come out of nowhere. Good movies set up our expectations and then surprise us with the payoff.
What makes a movie bad isn’t necessarily the plot or characters, but that things seem to happen for no reason. The hero may be in trouble and suddenly the hero whips out some magical item that we never knew about and saves himself from a jam.
This type of sudden coincidence or deus ex machina always makes for an unsatisfactory story. A good story sets up every major event beforehand. We cheer when Luke finally uses the Force and shoots his photon torpedoes down the Death Star’s ventilation shaft, blowing it up. But we believed Luke could do this because we saw how he and Obiwan-Konobi had used the Force before. Thus when Luke relies on the Force, it makes sense. It doesn’t just come out of nowhere.
What wouldn’t make sense is if we never knew about the Force and suddenly Luke decides to use the Force and blow up the Death Star. If that had happened, everyone in the audience would have been crying, “Foul!” And that would have turned “Star Wars“ into another bad movie. Think of “The Phantom Menace” or any of the three Star Wars prequels where Jedis can do anything that they’re practically invincible (and boring).
On a similar topic, you don’t want to set up a situation and never show the pay off. If your characters are playing with a gun, then later the audience wants to see that gun being used. If we never saw the gun and suddenly a character pulls out a gun, we’d think, “Where did that come from?”
Likewise if a character pulled out a gun early in the story, and then we never saw it again, we’d think, “What was the purpose of showing us the gun?”
You may have multiple set ups to reinforce the audience’s expectations. In “Star Wars,” we first learn about the Force when Obiwan-Konobi uses it to trick the stormtroopers into letting their car through the checkpoint. We learn about the Force even earlier when Darth Vader uses it to choke a commander from afar. The more times you emphasize the setup, the more importance that item will be when you finally pay off its importance in your story, such as when Luke uses the Force to blow up the Death Star.
Just aiming at the ventilation shaft is no guarantee that it will score a hit. An earlier X-wing pilot manages to shoot his photo torpedoes into the shaft, but they hit the side and don’t go all the way in. This sets up the suspense when Luke gets a shot because we’ve already seen one failure so we know what failure looks like, but we don’t know what success looks like. Once again, set up and payoff. The more tightly integrated everything in your story can be, the stronger your story will be. The less integrated your story elements appear, the looser and less satisfying that story will be. It’s just a simple law of story telling.