Such people are often, attention seeking. When they fail to catch the attention of others through other means, they resort to attacking religion. They know they are not doing the right thing, but still they do so--- just to catch attention. There is a proverb in my native language that goes something like this: A man could not be able to get famous, he attempted to urinate inside the mosque!