Appropriateness is always relative. We might like to think that there are universal norms applicable to all people and all situations. It simply does not work like that.
Profanity signals intimacy, because it presupposes a level of trust that the addressee will not take offence, and it situates the interlocutors as both being rebels against outsider norms of propriety, which signals solidarity. The same reasoning applies to the old taboos on sex and scatology, and the new taboos on race and sexuality.