If I ask the party for a perception check and they all fail the party should be aware of their choices (in this case, perception is important). If I then surprise them with an enemy they are clear why that happened.
Alternatively in this case it's to locate something, maybe they want to spend a luck point, flash of genius, or other similar ability.
One of the reasons why, as a DM, I like the Passive Perception mechanic in 5e. It takes some of the thrill of a roll away from the players, but it gives me the tools to resolve these sorts of situations without tempting the players to metagame.