Art provokes a reaction, if successful. There are different levels of “reaction,” but it should scandalize or make you think.
A 7-year-old with a Sharpie writing profanity on the playground slide also gets a reaction. Both art and that 7-year-old rely on the shock value, “Where did you learn THAT?”
This is not to say that the 7-year-old is any sort of artist for this, but they do recognize, immediately, that profanity carries much more weight than, say, “cat.” Getting a reaction is essential. They’ll get in significantly more trouble for the rude words, obviously. So those words are superior attention-getters.
Much of our profanity is sex- or excretion-based, because we don’t like to talk about those things. Gross.
Swearing well is hilarious, cathartic, or both. Using swear words constantly or in the wrong crowd makes a person sound crass.
So, then, there is skill both in weaving together the finest word choice as well as picking your audience (this may also be a telltale sign of figuring out how to behave like a respectable adult). Using profanity well is an art, because understanding the power and value of certain words enables a person to insert them in appropriate forums.