Maybe this is the disconnect that I'm having with this style of play... Why am I deciding a "purpose" for the picking of the lock? I guess, the purpose of the lock is to stop people from getting into a particular space and I put it there because in the context of the setting it would logically be there... so the purpose of picking the lock is to get into thespace it protects? Or maybe I am not understanding the question. Are you saying the difficulty of the lock shouldn't ever be an objetive thing but that I as DM should change it based on... what exactly?
I'll try to explain with an example that might make more sense in context.
When a DM creates an encounter he is determining whether that encounter is going to be a cake-walk, level appropriate, hard, or an overwhelming encounter as part of his encounter design assumptions. Within any given encounter he can use a varied level of creatures, traps, hazards and features. He has complete control of what the group faces as opposition/challenges. In this example he's already decided that he wants to use a "Hard" encounter. He might decide that the following mix is "Hard" based on the encounter guidelines - 3 skirmishers at Level, 2 Brutes at Level +2, and one Elite Controller at Level. He looks at it, and thinks that it's a little flat. So, he makes the Elite Controller a Level-1, and adds a trap at level +4. He then decides to cap it off with an environmental hazard at Level-1. This might be all, or just part of what the DM does when he decides to prepare this particular encounter. Which he has already decided is going to be a "hard" encounter.
Adding a "lock" to an encounter kind of follows in turn. The above DM decided to add a trap, and an environmental hazard for his own reasons - for a purpose. He also decided to lower the level of the controller when he added the trap. He purposely selected elements that he saw as "fit for this encounter." The same way that adding a "lock" is something added purposely.
It is the DMs "job" to determine what purpose that lock serves in the encounter. In "story" terms the lock serves to protect a section, as you mentioned. It's a "story" obstacle. However in simple mechanical game terms the "lock" is an obstacle designed to eat up resources, in this case actions. Because if an obstacle doesn't eat up resources in some form is it really an obstacle? In story, the DM decided to put an obstacle to reaching that "protected section." He could have chosen a chasm that must be crossed, at trap filled corridor, or a monster that opposes the party. Each of these elements could serve the same "story" purpose of "protecting what's beyond". The "lock" serves the same story purpose. But by selecting one mechanical element over another the DM has also decided how "mechanically difficult" it is to get to that protected section. A monster has a level. If the DM uses that he has already decided on a "mechanical" level of difficulty. Because a level X monster is usually easier to defeat than a Level X+5 monster. The same applies to any mechanical element chosen. If I want that particular element to be hard, I might choose Level+X. If I want to make it easy, I might choose Level-Y.
But all monsters of the same level are not created equally. They don't offer the same "level" of challenge. There might be times when you want to tweak that. Obviously, a level X skirmisher is less challenging than a level X elite skirmisher. The same way that not all obstacles of the same level are created equally.
That is one of the reasons why you also have a difficulty "quality" (easy, moderate, hard) in addition to a difficulty level to a challenge. You select the level of the challenge based on it's assumed difficulty. If you want it to be challenging you default to the same level. Because the base assumption is that same level challenges are "challenging." Then you decide whether that particular challenge is going to be easy, moderate, or hard (minion, standard, elite as a monster example). In the case of the lock you could equate that with it's basic physical quality (poor, average, masterwork). So selecting a particular "lock" is based on that "framework".
However, you could decide that getting to the protected area is much more than just an obstacle. You can decide that that the real purpose of the obstacle is not just to slow the characters, but to increase tension. There might be an unreachable trap shooting bolts of lightning as you try to by-pass the lock. You might have goblins firing arrows, as you descend the dilapidated stairs of Khazad-dûm. Or another imagined challenge. In that case you could create an entire skill challenge with the purpose of getting to the "protected area". The lock being simply one, or multiple of the obstacles that eat up resources (actions). Somebody might decide to smash the door in, rather than pick the lock, somebody might decide to burn the door, etc.
The reason I really like the way that 4e does this, is that they provided me a solid framework that works rather well. But not only do I have a framework that works well, I have a framework that can be used to continue to challenge the characters at ALL levels that the game is designed to support. How I decide to put together the elements to come up with an encounter is up to me. Just as how I decide to describe these challenges is up to me.