“The law exempts dogs used for guarding...”
One might argue that the dog was guarding the house in the owner’s absence.
A dog that constantly barks is about as effective a guard as the boy who cried wolf was effective at guarding sheep.