Taboo words are useful because they transcend politeness. If a normally civil person comes into your dinner party and tells you that the fucking ceiling is about to fall down, you get moving. You don't waste time looking around for the ironic smile. You don't reproach the person for speaking out of turn.
But it goes beyond simple cultural coding. The neurologists say that there's a physiological basis for swearing: the brain is wired to do so under certain conditions. Under extreme or sudden distress, swearing helps us cope, and the reverse is probably also true: swearing helps to work you into a rage or a panic. That's one very good reason why we tell kids not to swear and correct them when they do: It's a way of calming them down, and of teaching them to be calm, and of encouraging them to reserve their moments of adrenaline-surging fury for appropriate times.