Most gun owners don’t shoot around dogs due to local laws prohibiting the discharge of firearms within city limits. In order to shoot they have to go to a gun range where the sound is deadened using sound baffles, and dogs are usually kept away from the range.
Hunters often use dogs when hunting in rural areas. In that case the dog is usually several meters away from the firearm, and the discharge infrequent so that the damage to the dog’s hearing is minimal. I do not hunt but I own dogs and keep them inside when I target shoot for safety reasons.
But you raise a good point. Gun owners should be responsible for the hearing of their pets too. And guess what? A quick internet search found numerous products doing just that.
The Mutt Muff – Hearing Protection for Dogs (source)