In my eyes this only strenghtens the argument that you shouldn't touch the dice if nothing interesting is going on, if there's no danger or risk of failure.
If you're trying to pick that lock, you're rolling because if you fail, your tools are going to snap, or you'll trigger a trap or a monster is going to catch you or something simmilar. If none of those factors are in play, ie. if failure has no consequences and it's just a "can I try again?" type of deal, then the DM should just say "ok you unlock it".
Taking 10 and taking 20 only puts an additional, unnecessary step to table procedures.
Even if you're not rolling vs a DC, but only to see the "quality" of your roll, such as the case could be with, say, crafting, you still roll to see if there's some variance to your result. If you have Craft (Blacksmithing) and you want to make a sword, and you have all the time in the world, sure, you make the best sword you can, no problem. Otherwise roll and let's see how good a sword you can make in the three days the prince has given you before the contest.
Say yes or roll the dice, boom, taking 20 becomes irrelevant.
"why does a trap that we see without doing anything and that thus has no effect even exist?
Because bypassing the trap is the real challenge. Rolling and failing to spot a trap means just some arbitrary random damage. Finding a trap and then figuring a way to trigger or deactivate it, that's the interesting part.
Edit: because I wasn't particularly clear above. The DM should always give clear hints or descriptions of traps anyway. Only if the party is carelessly strolling about, risking to walk straight into a trap, you can ask for a perception roll, the risk being...you walk into a trap. At which point you can also ask yourself why not simply roll a Save at that point. Perception has always been borked in D&D, especially in relation to traps. I have given up on asking my players to roll perception. If there's something there, they'll notice it. If the ignore it, only then will it hit/trap/attack/whatever them and we can go to the dice.