But they don't give me a housekey, and they lock their doors at night.
It seems if people "rush" and don't let the npc's dictate the pace (like staying for an entire conversation between other npc's and not yourself) they miss out on things like this. It should be scripted automatically, however, I had to stay with the stormcloak and his sister while he sat on a tree stump and talked about what happened. After he talked, his sister talked and her husband talked she turned to me told me something like her husband was to show me to the house and received the key automatically. My friend did ALMOST the same method but left a bit earlier then me, I told him to go back for the key which he did, but all she did was tell her husband to show him the house say it was okay to stay but did not give him the key like they did for me. Everything we did was identical up to that point except, I let the dialogue and game flow its natural course and followed the npc's lead in everything until they gave me the key.
Hope that makes a bit of sense. I have had a bug free wonderful 2nd playthrough by taking my time a bit more and letting events flow completely natural (ie: not hitting tab over the last few words of dialogue, picking all convo options etc).
Fortunately im on pc and will wait for some nice small housing mods (would love to have the shack similar to the one in oblivion outside the imperial city, great little thieves/alchemists hut). Im sure Bethesda will have some DLC involving player houses at somepoint, but those player made houses are great since they know what TES players want in their homes and want as a home.