Not going to try and excuse her actions, they're inexcusable. But I will tell of how things like this can happen, in a scenario at least as I have zero personal knowledge of this case other than what's in the article.
There's a philosophy I was taught in one of my many courses of primary vs. secondary vision, pretty much conscious and subconscious thinking. Think when you're driving down the road and you're well rested and fully alert, you're paying close attention to the drive and on the watch for any hazards that you may encounter. That's primary vision. When you're tired, on your routine commute that you've done hundreds if not thousands of times, your mind is drifting to the day's events or focusing on the radio conversation, and all the sudden you realize you're at your turn and about to miss it, or you miss it outright and don't realize it until your subconscious picks up that you're now in unfamiliar territory. That's secondary vision.
After pulling a shift on duty, this officer went from being switched on the whole time, in Cooper's Condition Yellow to Red the entire eight (plus) hours, and that is mentally exhausting to the point of being physically exhausting. She gets off shift, drives home, and mentally shuts down to Condition White combined with being in secondary vision. Apartment buildings pretty much all look the same, it's not hard when exhausted to walk to the wrong apartment. I've done the same at one of our camps that had thirty buildings that all looked exactly the same, accidentally walked into the wrong building and put my hand on a doorknob when I immediately realized my name wasn't on the door - Wrong building dumbass, wake the fuck up.
She walks into what she believes to be her home, and there's a man inside it, and she immediately switches from white to red with zero situational awareness other than her seeing an "attacker" and she has a sidearm on her hip. That she then went to full tunnel vision, never realizing she was in unfamiliar surroundings, is really shitty. Bad shit happens in a gunfight, lots of it, and is why fratricide is a thing no matter how many IFF systems and training LEO and MIL undergo and acquire.
She's going to go down, hard, and there are zero winners out of this one. Unfortunate all around.
Stay frosty gents, because this can happen to any one of us.