"It's their bark, not their bite, that makes them valuable."

In this respect, they are not much different than false alarms on electro-mechanical systems. If a thief knew a dog was in the house, he could get the dog to alert repeatedly until it too is regarded as a nuisance and ignored; or worse, conditioned not to respond. Imagine having your dog wake you every night for a week between midnight and 4:00 am barking and growling. Your search for the distubance yields nothing, and after a week or so of this you are losing sleep. You might not ever realize that he's being alerted like that on purpose, if you never see a perpetrator rustling bushes or tapping on a fence in the yard, or some such.

Dogs on patrol in the yard are a direct threat that has to be dealt with more deliberately. Dogs in the house as an alarm are not much different than an alarm, and just require more indirect methods to neutralize.

This is not to say that a dog isn't darned handy during a home invasion, especially if the homeowner is armed and willing to use effective force to repel the invader. But they are not foolproof either.
_________________________
The ultimate result of shielding men from the effects of folly is to fill the world with fools.
-- Herbert Spencer, English Philosopher (1820-1903)