And what would the local government had done had the owner happened to be there and had put a bullet in the thief instead of waiting for the dog to do it?
It's not about the outcome or the dog. It's about sending a message to everyone else in town that that level of defending one's property is not going to be let slide.
Depending on the jurisdiction you might end up paying quite a lot of money. Potentially lethal boobytraps left in derelict buildings are mostly illegal in the US[1] and in other western countries shooting a thief is generally illegal unless you can prove fear of bodily harm since you are escalating a situation from damage to property to damage to body. While the US is rife with stand your ground laws - most of the rest of the western world finds using potentially lethal force in response to property damage abhorrent.
In most of the United States, that is no longer true. The law previously required a "duty to retreat" if the home owner encountered a potentially violent assailant. However, most states now have "Castle Doctrine" laws which shift the burden of proof from the defense to the prosecutor. [0]
Most prosecutors will not charge a home owner due to this change in laws. Civil liability is separate factor, but criminal charges are rare.
It's not about the outcome or the dog. It's about sending a message to everyone else in town that that level of defending one's property is not going to be let slide.