Should players expect that all scenes/encounters be defeatable?

I don’t play D&D and its derivitaves all that often but when I do I notice that players tend to approach every encounter with an expectation that their character sheets have enough on them to get through it. If a monster or monsters confront the characters, the question is often not “should we face this or flee” but rather “how many rounds will it take us to defeat it?” That’s not to say that balanced encounters aren’t challenging or don’t result in PC deaths, but rather such events are attributed to sloppy play or bad dice rolling rather than “we should have run in the first place.” (Worse yet is the “why did you pit us against that if we couldn’t defeat it?” mantra).

I’ve noticed that this idea of balance infects other games as well. Many games employ the concepts of a “minions,” NPCs that PCs can easily steamroller, and “villains” that the PCs, working together, can defeat in combat. PCs are sometimes given “bennies” to tip the balance in their favor as well.

Still, one need only go back to one of D&D’s literary sources, The Hobbit, to see an example of a PC in over his head hoping not to wake up a dragon while he steals something from it. I also recall several adventures in my old school days (including old school video game days) where the PCs would get spanked something fierce if they encountered something too powerful and didn’t run.

So today’s Hot Button is this: Should players have an expectation that they can overcome every scene/encounter? Or is it okay to have some encounters where the PCs have little to no chance at direct confrontation?