Because there used to be a taboo against swearing oaths by divine figures in Protestant England, and the taboo against oaths got conflated with the taboo against profanity, as Saying Bad Things.
In fact, that conflation also applies to oath:
5. an irreverent or blasphemous use of the name of God or anything sacred.