One of the main tenets of drama is conflict. In real life getting what you want without fuss or bother is seen as a win. In fiction, it’s a loss (for the reader).
A common approach in stories by aspiring writers is the near-miss. This is where a character is faced by a problem, one that they know is coming, so they take steps to be ready for it. The build-up is all there. And then the problem disappears. Either they were mistaken, or they weren’t discovered, or a distraction pulled the bad guys away. Something enables the character to avoid conflict.
Whatever the reason for doing this, the effect on the reader is pretty much always the same: disappointment.