Anyone who's tried it will tell you that writing is first and foremost an act of creation. Every story has it's characters and scenes that need to be formed from the actors imagination, but getting into Fantasy or Sci-Fi, there is so much more to conjure.
Profanity is something that really adds color to a story, but the words we use just wouldn't fit outside of our social context. I didn't put much thought into it until I wrote-in a farmer/veteran. Plainly, he wouldn't be speaking like the Aristocracy of my story, and not considering how he would speak differently would make my character's pretty 2-dimensional.
I remembered a conversation that I had with a friend at work. I had heard a customer use the phrase “Tabernac!” as a frustrated outburst. I asked him what it meant, and he didn't know, but he's heard a French-speaking friend use it on the golf course, so he knew it was pretty foul. My friend had been raised in Montreal, and only spoke French until he was 14.
He informed me that “Tabernac” was, as I suspected, derived from the location in a Catholic church that represents the presence of Christ. (In English, the word “Tabernacle” is used. It's from the Old Testament referring to the tent where the Ark of the Covenant was kept). Before explaining it to me, he said “As you know, a lot of swearing comes from religious words...” Well, yes, but I hadn't really considered it. That's why I love talking with bi-lingual people, they have a wider perspective, since words frame our thoughts, and they can think in two dialects.
Anyhow, to create the profanity of the world, I had to start with the religion of the world, and more importantly, how that religion was presented to the illiterate masses.
How do you deal with this? If your world-building is ground-up, like in Fantasy or Sci-Fi, how do handle this? How have you seen it handled by other authors?