Is this supposed to be a joke? I've no problem with jokes that play on the stereotypes of nationalities and religions, but this one just doesn't make sense.

As far as I can see it's no different to a joke with a punchline along the lines of "because all Blacks are stupid", or "all Arabs are fools", or "all Muslims are idiots".