Have you ever owned a dog? Have you ever even seen one in real life? You seem to have a limited understanding of their limited nature. Perhaps she should have locked the fucking door if it was the middle of the night. If the person entering had a key, then that is a problem all its own for the dog to attack someone who apparently is allowed to be there.
Owning a dog is a calculated risk. There is always a chance they will injure someone, and once they do it once to a person who is not actively a threat, the risk increases. Dogs are creatures of instinct and habit, and what a dog perceives as a threat is not the same as what we would perceive as a threat. The dog has become a liability.
I am not a dog- I have the ability to make complex decisions and decide not to be a prick. A dog just follows its nature.