The context is probably someone is late or couldn't do a task due to being locked out or a jammed door.
So the conversation was probably like this:
"Why didn't you clean out the closet like I wanted you to while I was gone?!"
"I was trying but couldn't get in! What happened was the door wouldn't open! Someone locked it, and I don't have the key!"