Because radio stations have microphones everywhere.
And disk jockeys are daring personalities who love to tempt fate, it stands to reason that they swear a lot around microphones. Or better yet, re-record something, such as a liner, and insert the appropriate naughty word, and then keep it around on a tape cartridge (cart) for everyone's amusement.
Back in 1972 Roger Ramjet while jocking at WIDB had one such recording come around and bite him in the ahhh........let's let Roger tell the story,
"I had the 55 minutes of music cart that we played after the first record in the hour set to go. At the last minute, someone walked in behind the board man (who could well have been Otto the Trained Bear) and switched the cart. I knew full well what it would say, but at that point I had no option but to throw the cue anyway."