So my latest character finally gets around to buying the house in Whiterun, Breezehome or some such. That is the first time I have done that. In order to get to buy it I had to follow the steps of the main quest so far as to the first dragon. My current character is not exactly combat-oriented, so mostly left the hard work to Irileth and the guards, not that anyone noticed, them all being awed by what happened after it died. So I still became Thane of Whiterun and was assigned Lydia as my personal housecarl. I had already teamed up with Uthgerd though, who is quite competent, I have to say, so beside chatting a few words with Lydia near the exit from the Jarl's hall, I pretty much forgot about her. I set off to the Embershard mine south of Riverwood to get some iron ore, and brought along Uthgerd to clear out the bandits. It was night when I came back to Whiterun, said goodbye to Uthgerd and locked myself into my new home for the first time. I looked around. Nice enough place. It even had a loft. I went upstairs ... and jumped when a voice behind me said "Honor to you, my Thane." I whirled around, and there was Lydia, walking right past me and throwing open the doors to the bedroom (with a double bed), saying: "What do you need, my Thane?" and walking in there ahead of me.
I'll probably never know for sure exactly how scripted that was.