Semantics is about the relation of words to thoughts, but it also about the relation of words to other human concerns. Semantics is about the relation of words to reality - the way that speakers commit themselves to a shared understanding of the truth, and the way their thoughts are anchored to things and situations in the world.
If you aren't just brought up in your tribe but interact with other people either directly or vicariously, through journalism and literature, you see what life is like from other points of view and are less likely to demonize them or dehumanize others and more likely to empathize with them.
I think the reason that swearing is both so offensive and so attractive is that it is a way to push people's emotional buttons, and especially their negative emotional buttons. Because words soak up emotional connotations and are processed involuntarily by the listener, you can't will yourself not to treat the word in terms of what it means.