One of the undisputed rules of storytelling is to hurt your characters: the protagonist must either fail to achieve a goal and in so doing make things worse, or achieve that goal at a cost that outweighs the benefit. If the writer is doing it right, in most cases things spiral out of control because of decisions and resulting actions from the protagonist.
However, there is nothing worse than having characters act stupidly as a plot device. Call it stubbornness, or impetuosity, or bravado . . . when your protag gets themself into an avoidable situation it can be pretty hard to convince a reader that they aren’t just plain dumb. (We’ve all read novels where we’ve rolled our eyes and cringed.)
The thing is that of course the protag is going to make a bad decision — it wouldn’t make a good story otherwise. And it may be for one or more of those reasons. But the author has to establish first that the protag could not possibly have made any other decision, whether it’s to do with the core aspects of their character, some form of coercion, ignorance or whatever. The reader needs to believe as the ensuing disaster unfolds. They need to empathise with the character’s choice, not label him/her an idiot, which totally undermines the story.
What is interesting — and increases the writing challenge — is that different readers have varying levels of engagement with characters and hence have different tolerance levels for ‘bad’ decisions.
So what is the ideal balance between bad, stupid and acceptable when it comes to character decision-making?