Classical rhetoric, the art that the Greeks valued so highly but which we largely ignore, taught that persuasive speech is based on three essential tools: logos or logical reasoning; ethos, the credibility that derives from the speaker’s good character, and pathos, appeals to the emotions and sentiments of the listener.
We tend to think that logos, logic, is the most important of these, but the Greeks weren’t so sure. They thought that each had a valid role in persuasion and that which one the speaker should stress depends on both the listener and the situation. To them, the goal was not to be right, the goal was to persuade.
Cursing definitely falls into the category of pathos, an appeal to emotion. It has its place. Think of a cop trying to get control of a precarious situation. Here logos, logic, won’t be of much use. Ethos may help, which is why the cop may shout “POLICE!” when he arrives, hoping that his position of authority will carry persuasive weight. But his main tool will be pathos: “GET OUT OF THE FUCKING CAR NOW!” Cops don’t hesitate to swear, because they know that pathos can work wonders in the right situations.
In the wrong situation, however, swearing can do immense damage to one’s ethos, the projection of one’s character. If one uses this kind of pathos when logos is really called for, the listener will assume that you don’t know how to reason well, and so everything you say will be undermined. Inappropriate swearing casts doubt on one’s judgment (which is also a factor in one’s ethos): it demonstrates that one can’t read situations well and may not be able to gauge the appropriateness of his actions. Again, credibility is lost.