Dogs probably howl because they enjoy it.
Howling is a part of the dog’s vocal repertoire, along with bark, growl and whine. Dogs use vocalization to express all kinds of emotions.
In evolutionary terms, pet dogs are separated from wolfs by mere minutes. This plaintive and haunting call is an evolutionary gift from wolves. Researches do know that wolves and coyotes may howl to advertise their territory, connect with pack members who have become separated, and attract mates. Howling evolved as a long-distance call among wolves.
Domestic dogs tend to bark, rather than howl, to alert and protect flocks and people. Some dog breeds, like Huskies and Malamutes, may be more likely to howl.
Some dogs will howl as a symptom of separation, anxiety or loneliness. This may explain why dogs howl at night more than during the day, and if there left alone from their owners. Most dogs will howl along with sustained noises like sirens, which mimic the low to high sound of a classic howl.
Howls, seem to be contagious. First, one dog in the neighborhood howls, then another, then the dog down the block chimes in, and so on it goes.
Every howling is not sad, despite how it may sound to our ears. Dogs usually express joy by howling. For example, they may tilt their noses up and howl when they see a best pal at the dog park.