The ever-readable John McWhorter turns the air blue in the Wall Street Journal:
Novelist Frances Trollope was appalled at the amount of cursing she heard among working people when she toured America in the 1820s. At the turn of the 20th century, a slang dictionary notes that the F-word was already in widespread use, although we hardly know it from anything anyone put in writing at the time. In the early 20th century, a cigar-chomping man-of-the-people sort like journalist H.L. Mencken freely used the term euphemized as SOB among friends, despite never venturing it in his newspaper columns.
Still, a sense reigned that one kept the “bad words” out of polite society. The same year that Ginger Rogers was substituting tummy for belly on Broadway, Cole Porter put the SOB term into a song lyric sung by a woman in “Gay Divorce”—but with the joke that when the singer uttered the final word in the expression, a drum smack from the pit drowned her out. Certain proprieties were assumed in public settings.