Dog’s are descendents of wild wolves and as you know, wolves don’t bark (they howl) – so why do domestic dogs bark?
The reason is that they have evolved to do so – through selection by humans!
Barking was originally encouraged in domesticated dogs to scare off intruders and to provide a measure of defence for masters (people).