I have found some reasons why dogs do bark.
1) The dog may feel worried, hungry or anxious. He may not be used to being alone. He is afraid of abandonment. Or he just is trying to tell you he wants some food in his bowl.
2) Dogs bark when they see guests. At my house that means the mailman, the cookie selling girl scout, and the pool man across the street. But this can be an uncomfortable greeting for the guest.
3) The Territorial Imperative. My terrier barks at anything and anyone that comes in or near our yard. It is her turf. Yet I can take her into the waiting room at the vets or the groomers and she ignores the other cats and dogs around her.
4) The dog may need exercise. That canine energy has to be released somehow.
5) The dog may be too secluded and not used to people. They just frighten him.
6) Environmental reasons such as loud noises (sirens, fireworks).
7) The dog may be bored and wants your attention.
Training is most useful in halting uncontrolled dog barking. Shouting at your dog will not stoop him. If you train him in the basics of "Stay". "Sit", and "No", you will be able to control his barking.
To help socialization your dog, you can take him to dog parks where he can interact with other dogs and people. When I take my Saluki to the dog park, he finds the closest person sitting on a bench and sits down with his bottom on the bench next to them. But then, he really is not a barker. He is just a weird dog.
If your dog tells you he wants something by barking, do not give it to him immediately. Wait for him to stop so he sees that barking is not the way to get what he wants.
Dogs sometimes pass the time by barking. Try giving the dog chew toys or chewable healthy snacks to give him something to do.
As a responsible pet owner, it is important to socialize your dog so his behavior is acceptable for your family and friends. Pet owners who do this will have a long loving relationship with their pets. Pet owners who do not take this responsibility seriously end up giving away their animals or abandoning them (a decision for which there is no excuse.)
So before you go and get that adorable puppy, think about the responsibility of owning a pet. A misbehaving animal is your fault, not theirs.
Love and teach your animal. They live to love you.