What language function does profanity serve?
To greatly oversimplify: I don't think there's really such a thing as profane language. Only profane usage.
For instance, the 1968 movie Planet of the Apes closes with the famous lines:
You Maniacs! You blew it up! Ah, damn you! God damn you all to hell!
At that time, "God damn you all to hell." was considered language worthy of the censor's red pen. But this was allowed to pass, on the grounds that the usage was not profane: the character was literally asking God to damn people to hell for what they did. Curiously, the censor was more comfortable with an earnest prayer that the Almighty should inflict us all to eternal torment than with a simple, vulgar expression of outrage.
Why do we do it? The best theory I've come across is that we are communicating the intensity of our emotions by shocking the listener with emotionally intense words used out of context.
So, returning to your original question, can we manage without profanity? Of course. But when Dame Judy Dench says, "I've really fucked this up" in the movie Skyfall, that word fuck, coming from the mouth of an otherwise well-spoken character, packs a powerful emotional punch.
Profanity can serve any of several purposes in communication, and by doing so, it modifies the tone of the communication.
Here are some example of what it can do (a couple of these you already stated):
- add emphasis
- shock or throw someone off balance
- create a distraction
- show irreverence, contempt or disrespect
- titillate (excite or arouse agreeably)
- provoke (excite or arouse to a state of anger or rage)
- set the tone or "register" of the discourse (to be very informal)
- encourage uninhibited discourse (if it is not otherwise taken as disrespectful)
- implicitly or explicitly indicate anger
- vent or release tension
- create tension
Here is an article you might find interesting: Cursing is a normal function of human language, experts say.
Hmmm ... old post, but interesting. Many years ago I came across an article while doing a lit review (sadly, I did not keep it) that extended the proposition that "cuss" words are a form of violence, the function of which is to shock. The author argued that in confrontations that have the potential to descend into physical violence, swearing may serve to diffuse the aggression and minimize the threat. If I recall rightly, the author also discussed the normalization of swear words in common usage. He opined that we are using up our swear words and are not replacing them with anything that has the same aggressive impact.