If you were having drinks with your friend Carl and, in the middle of a deep conversation about locally brewed IPA’s, Carl grabbed your gin and tonic and dumped it on the floor, you would want to know his motives. If he had no explanation for his actions you might then decide you no longer want to hang out with Carl. The same goes for characters in stories.
A writer always has a reason for a character’s actions. To set up an event, to get someone out of a bad situation, to allow for romance or just adding some interest to a filler scene, character actions drive a story. But while the writer is god of the world they create, they should never remove free will from their characters.
So every time a character does anything you, as a writer, need to ask them why. And they need to be able to tell you.
Why did you pick up that stick that ended up allowing you to kill the zombie you didn’t know was coming?
Why did you get in the car with the man who you later realized was your soul mate?
Why did you wear that amulet that turned out to be the magical crystal of power?
The character has to have reasonable motivation for doing these things and they need to be established before they come into play or else your writing comes across as sloppy and transparent.
So if the situation with Carl was a story and, as a writer, you know that the gin and tonic is poisoned, you have a reason for Carl to dump it out, but that is not enough for your reader. Carl needs a reason (he has a long standing vendetta against the gin brand, he saw the tonic was expired, he’s just realized the protagonist slept with his girlfriend) or else you’re cheating your reader, and you never want to cheat your reader. They are the people who pay you.