Door locks aside, I wonder if the lights were off upon her entering and whatever commotion had her reaching for her gun rather than the light switch, assuming there is a light switch immediately inside the entry.
If the lights were off, he'd be asleep in his bed most likely or in bed winding down etc (most likely). Him rummaging around might mean using the toilet but that'd be sufficiently far from the front door and she'd have that light to turn on first, but moreover, there'd be such distance and obstructions between her and the victim that she'd have learned she was in the wrong apartment by then. Also, if the lights were off, then the door most likely would not be unlocked or open. So, this is one of those very unlikely scenarios, I think.
I don't believe this is what happened for other reasons as well and I have more info now than compared to previous posts.
https://heavy.com/news/2018/09/amber-guyger/
According to this link above, she had been a recent move-in to the apartments, living there for a month. Given that she was fairly new and had just gotten off a shift, I could see her honestly making a mistake. If she also had a drink or some pills or something at the end of her shift, that would make this very reckless, but I think logically the mistake could happen just from being very tired at the end of a work day in combination with being new at the complex. However, I will add that being new at the apartment complex and at the end of her shift means that also she should have tended to question her own judgments about where she was, mistakes she could make, etc.
The article also mentions that she tried the door and couldn't open it...meaning that she was seeing the red light from trying the wrong key. The hallway was lit as hallways tend to be in a big complex like this. The number was there of the apartment. She kept fumbling with the door over and over. Then, the victim came to the door and opened his own door because he saw a cop out there trying to open his door. Now, did she yell "Open up" thinking a burglar was in her apartment, hearing him rummage around, getting out of bed? Maybe or maybe not.
Upon his opening of the door, he would have communicated, "what are you doing here" or the same kind of thing that Trayvon Martin said "why are you following me" but in this case no one was following, so just some innocent question, maybe even angrily, since it was his apartment. So, then, why was she so threatened she had to kill him? And did she not apply emergency first aid?
If this happened at the doorway and it wasn't her that yelled Open up, but police later, then why would the door be closed? Did she chase him into his apartment and kill him there after seeing all his pictures and other things specific to his own apartment, different from hers?
Well, at this point, I tend to think she did not know him now with this extra info. I still don't see why it was necessary to shoot him, never mind kill him, and then possibly not apply emergency first aid, as we see in many, many cases of police shooting people.