There is one possible explanation: it's the fault of the French.
Prior to 1066, only germanic tribal languages and celtic were spoken in the British islands (the Scots would argue with that, I suppose, but their language was a mix of celtic and germanic languages. When the French-speaking Normans invaded, they imposed French on the educated peoples of the land. Only the poor and rural peoples continued to speak the other languages. Many of the words of those other languages became forbidden in the cities, universities, and in the royal court. They were considered "vulgar" (from the Latin - of the people or masses). Educated people didn't use them. Eventually, the French were thrown out, but the effect of the French language overlaying the Saxon, Angle, Welch, Celtic and other dialects stuck. It's largely how latin words got into the "Angle-ish" (English) language. The attitude toward many "vulgar" words also stuck and so "swear words" (phrases with lower class oaths attached to them) and "curse words" (same) became socially unacceptable, especially with the rise of the middle class, all of whom wanted to be considered "educated" and "noble", even if they weren't. The "F" word is said to have been associated with the Old English/Middle High German word "to strike or hit sharply or with great force" (ficken), a perfectly acceptable word prior to the French domination. Other "four letter words" may have similar roots and levels of unacceptability, depending on the age. The word "nice", for instance, is perfectly acceptable now, but a "nice girl" in the 16th century was a young woman of ill repute(!)
Of course, all of this is theory only, and it doesn't always hold up for all words that we consider socially inappropriate today. But, at least some of the words that we don't want our kids to run around saying may have, at one time, been OK for everyone to use.
Ain't language fun?