Dogs wear muzzles for many different reasons, not just aggression.
Why is it a good practice to teach a dog to wear a muzzle? Putting a dog into a situation where they are already uncomfortable and then adding the never-before-worn muzzle adds even more stress to the situation. This means their next experience with training, at the vet or groomers will be even more stressful.
My dogs are all muzzle trained. Over the past couple of years our Desi has had a lot of vet visits due to skin issues. As the vets and vet techs are climbing over this 150 pound Great Dane to examine and obtain scrapings and biopsies they need to feel safe in order to give him the best care. I am not offended and actually offer to muzzle him. I want to make sure he's getting the best care but I don't want him stressed out, either, since that can make his issues worse.
We start muzzle training early. We show them the muzzle, let them sniff and check it out, giving them treats. Then we put treats in the muzzle so they can put their faces in to get the treats. Once they are consistently putting their snouts in by their own choice we add the strap. Then we secure it, very briefly, with a high value squirt of spray cheese added. Gradually they wear it for longer and longer periods of time, adding activities such as going outside or for walks, always keeping it fun with high value treats.