Well, I think you are butting into a case of perspective differences.Fiction first, but even fiction follows rules. And in most cases, a predictable ruleset follows predictable patterns. Hence, you can pre-write the character's DC's or challenges prior to them starting. As stated earlier, if they come up with something you didn't think of - great. That's part of the fun of DM'ing. But, for most obstacles, they are confined within the ruleset, and therefore, at the most, modifications (bonuses or negatives) are all that are needed.
If I assign a locked door a DC of 25 to pick, I do do because I know as GM the facts in the situation have established the skill and effort put in to security here, plus extra resources, due to the folks involved and their traits and capabilities. Most likely, it comes as expected by the PCs by the time they get there, based on what they have experienced there as well.
Now, if they get there, and go with "screw it, tear the wall down" because the setting has changed so far from they arent worried to just hammer away for hours, then that DC does not see use - except maybe if they try and somehow sell that lock later maybe. Here I would be looking up the breaking objects and walls rules, or ruling in the fly as again by the fiction.
Additionally, if they charmed or coerced someone to open it for them, again, that DC is not used.
Thats all normal for task redolution even with pre-figured DC vs dkill checks listed.
So, yeah, exactly, there are rules and your own campaign guidelines but most GMs I have encountered know to apply them based on the choices made, not be shackled by them.