Exactly dmigty. The point is that this wasn't a joke, it was an insult. There's a subtle difference that some need to realise. If you aren't willing to substitute the subject of a joke with another subject then it's probably not a joke but an insult.

If it was acknowledged stereotype that atheists were fools, and atheists had done something to generate this stereotype, then it would be a good joke. But that isn't the case, so it became an outright insult. Just as it was when Muslim was substituted for Atheist.