Every dog I have had has 'learnt it's manners' as soon as it sets foot (or should I say paw?) in the house. Positive based training I should add.
That includes barking. Alert barks are OK but nothing else.
I, like many others have already said, think it is the owners in the main. Yes, you do get a yappy/barky dog that is tricky to train but on the whole it is down to the owner.
There's been a marked increase in recent years - especially since COVID, in dogs dragging their owners hither and thither (usually at the end of a long "training" lead), barking and lunging at everything and anything. On the continent, several countries (can't remember which ones but I think Norway is one) that require you (by law) to attend training BEFORE you get a dog (or horse or whatever) and do wonder if it isn't way past time we introduced something similar here.
It sometimes seems to me that people expect their newly acquired 8 week old puppy to be fully trained - just looking at all the ads stating that the 9 week old puppy is up for sale because their work hours have changed - that excuse always makes me suspicious that the reality is a bit too much.
Back to the barking...
I live in a rural area outside of the village. We all have v large gardens or a few acres (or more!) and several people keep hens - and some even keep cockerels (despite just wanting eggs...) so it can get a bit noisy at times with all the crowing.
One of the neighbours complains a lot about the cockerels crowing throughout the day. Funnily enough, she doesn't seem to notice that her 'pack' of dogs are constantly barking day and night whenever they're in the garden - which is a lot.