Think of it as a choice. You don't write an adventure to make a locked door a roadblock, but instead, an opportunity. If they can open the locked door, they might get a better reward, or skip an encounter.
Or they could get the same by not being able to open the door.
I once ran an adventure where the PC's came across a long hallway with several pit traps. They weren't hard to notice, so the party Thief (it was that long ago) just started disabling the traps by using a piton to spike the traps shut.
The whole time they were in this dungeon, they kept coming upon signs that, long ago, another adventuring party had gone before them, and close to the end, they found the body of a deceased adventurer who had gotten trapped and ran out of food and water. Scratched on the wall with a dagger was their last testimony- something to effect of "damn him for falling into that trap with the key".
The party deliberated on this, and someone was like "hey, we didn't check those pit traps, did we?". I turned out in one of them was, in fact, the remains of a fallen adventurer, who had some decent loot on them, as well as a key that would have made the entire adventure quite a bit easier.
It was my first real introduction to the concept of "failing forward"- a party with a less capable Thief might have fallen into the trap and found the key. But because the party's Thief was more competent in their skills, they found and bypassed the trap and carried on, little knowing that they really wanted what was in the trap!
From the way people are saying Rogue's skill use should be treated in 5e, a "trapfinder" Rogue might be told "oh yes, you can easily find and disable all the traps in the hall without rolling because you can't possibly fail". They might elect to do so and completely miss out on the point of divergence in the adventure.
Whether this is good or bad depends on one's point of view. The adventure could play out very differently based on the precise makeup of the party, creating a different kind of story.
In 4e, some skill challenges weren't pass/fail, but like the above example, you might find something you otherwise wouldn't, like a treasure cache or a shortcut depending on the results. For years, I've structured my adventures this way, using skill checks as decision gates- the party will most likely see the adventure through either way, but the precise course taken can vary based on their ability to interact with the environment presented.
This applies to dungeons and trekking through the wilds- maybe you found a way to ford the river, or maybe you get washed down it and see a cave in the cliff wall that you might have missed, the glint of something shiny on the shore, or get fished out of the river downstream by a friendly ogre fisherman!
When I started DMing for 5e, however, I found myself a bit stymied. As a player, I'd noticed a lot of really high DC's for low-level adventures, like a DC 20 lock in the adaptation of Sunless Citadel (in Tales From The Yawning Portal). And I was like, now wait a minute- a tier 1 character usually starts with a 16 and has a +2 proficiency bonus. Shouldn't most checks be closer to DC 15?
Oh well, Rogues exist, they can get a +2 from expertise! Not a big deal, they're just a little bit better. So I started filing down DC's for checks.
Then suddenly I found myself face to face with the tier 2 Rogue with 18 Dex and a +6 bonus and I was like "huh, well now they're at +3 over other characters..."that seems really good for a game that has smaller numbers", I thought...and I realized that eventually, Rogues had become a, uh, "rogue factor" that I wasn't going to be able to account for. They would almost "turn off" skill checks entirely unless I raised the DC's- but if I do that, then skill checks are turned off for non-Rogues. Then as 5e kept going, more ways for other classes to jump on the Expertise train kept getting printed, and more ways to ensure success appeared- advantage became far easier to get, every Cleric turns into a guidance spammer, and even seemingly innocuous feats like Observant became issues when Crawford is like "oh well you see, your passive check is a floor for skill checks, you can't roll worse than that" (which is basically pseudo-Reliable).
It felt (to me) that the idea of regular ability checks and skill checks was being obsoleted- you now had to have all these other kinds of bonuses just to compete!
I started to have to make house rules for "degrees of success" instead of simple pass/fail, and I wondered why this was happening- what's the point of a skill system if you can just opt out of it?
Some have brought up "well, spells", because these kinds of effects also tend to trivialize skills. It's a fair point, but using magic to bypass a skill check has a different kind of opportunity cost. If I use knock to open a stuck door, I've used a spell slot I won't have for a future encounter. I also make a lot of noise, which has it's own concerns. If I instead have a Rogue just snicker at the DC, it raises the question of why even have locks or doors in the first place, lol!
I guess I don't know what the right answer is. Completely ignore skill checks in my adventure design that I know the Rogue will always succeed at? No point in using them to make the adventure more interesting, if there's never going to be a result other than "success"?
But then isn't that basically ignoring the fact the player has a really good skill? Will they, at some point, realize "hey, I wasted my time on Expertise in Investigation because there's never any traps or illusions that anything more than dungeon dressing?"
To me, it's a proud nail. I can't go on ignoring the +2-6* bonus like it's not there- I know it exists, and I have to design around it. I find the experience of not having a Rogue in the party more pleasant when I'm brewing adventures- which is sad, because I really like the class! I just want to find whoever came up with the idea of multiplying the proficiency bonus and throttle them, lol.
But if I do that, then I have to go after the design of guidance, advantage, luck points, Bardic influence, the ioun stone of mastery, Feats, and a lot of other small advantages a party might or might not have access to- I can only assume that the designers felt that all these are about equivalent, and parties will have access to some or all of these- "what if they have Bard instead of Rogue".
Leaving unsaid quite what to do if the party has Bard and Rogue and Cleric too!
Which, according to a lot of posts in this thread is- nothing. You do nothing.