Some dogs become extremely stressed when their owner leaves home. This separation anxiety expresses itself in behaviors like excessive barking and whining, and in destructive actions like scratching doors and walls and trying to escape from the house.
Like all other mental and behavioral issues, separation anxiety has both genetic and environmental causes.
Studies have found that small dog breeds are much more likely to experience separation anxiety (and many other behavioral problems like aggression, hyperactivity etc.) than large breeds. Some argue that this is because humans have bred small dogs for their "cute" and infantile appearances, and along with these traits come immature behaviors which we (mostly) tolerate because the dogs are just so darn adorable. In contrast, anxious and aggressive behaviors are not tolerated in larger dog breeds, because they're potentially very dangerous, and these behaviors and have been bred out over the centuries.
Environmental factors that may influence separation anxiety (for dogs of all sizes) include the amount of socialization to different sights and sounds during puppyhood, and amount of daily exercise.
A large, 2015 Finnish study found that "fearful dogs had experienced poorer maternal care and had been less socialized before the first three months of life." This suggests that appropriate puppy socialization during the first 12 weeks of life can help reduce the likelihood of adult dog anxiety disorders. The importance of puppy socialization could also explain why dogs that are abandoned or rescued from shelters are more likely to experience separation anxiety.
The same study found that dogs who have separation anxiety, and noise sensitivities, get significantly less daily exercise compared with dogs who don't have these anxiety problems.