My Australian shepherd barks continuously inside and outside our home. One of the primary reasons dogs were domesticated is because they bark. Dogs sound an alarm when a predator is near, announce a visitor or alert us to an intruder.
Dogs also use barking and other vocalizations such as whines and growls to communicate.
Excessive barking, however, becomes a problem and is one of the main reasons owners get rid of a pet. Problem barking falls in five categories. Some dogs may fall into several of these categories and have mixed motivations for barking. The slightest sight or sound, such as a car door slamming down the block, elicits a barrage of barks. The dog can't distinguish between situations that pose no threat from those in which it is expected to bark.