All doors will eventually re-lock themselves.
Especially those used by NPCs, as it's in their scripts. I seem to recall trying to get Aela to unlock Pavo's (sp?) house outside his mine, but she said, "Can't do that!" Never tried again until yesterday when I was in Windhelm on my latest character with Lydia in tow. I'd just started Blood on the Ice and was ready to go to Hjerim. Of course, the door is locked (master level) but on a whim I asked Lydia to unlock it.
"Got it!" she said, though she didn't appear to do anything but stand in front of the door. I looked away, then back again, and now the door read "open Hjerim." Good grief, her first lockpicking, master level lock and no lockpick, and it's nothing to her. Later I tried to get her to unlock Calixto's House of Curiosities, but she said, "Sorry, can't do that."