The phrase is often used metaphorically to discuss reputation, not actual dogs. Once you give a dog a bad name, it's hard to clear it.
Pro Tip 2/3
Negative Emotion
Using this phrase implies a strong negative emotion towards the action of harming reputation. He didn't just criticize her; he gave the poor girl a dog's bad name.
Pro Tip 3/3
Social Consequences
The phrase emphasizes the long-term social damage of rumors or slander. In our small community, to give a dog a bad name is to ruin someone's social standing.