Salaam/peace,
I wanted to post something about these wonderful God's creatures: dogs. No where in the Holy Qur'an did I find that dogs are evil, dirty, etc. Depending of a culture, people do treat them differently. In America and some other western countries, people absolutley love dogs and keep them in their homes, almost like members of the family. In other western cultures, they are pets but live outside, in the backyard dog houses. Yet, in some other cultures, they are considered impure and, almost, evil.
As a young kid I had a dog pet. The culture I grew up in did not support/encourage dogs as house pets, so we kept him outside. Yet, I loved my dog and played with him whenever I could. I did not like some the stuff he did which physically made him dirty
but I liked him a lot.
Anyway, as a Muslim, I never heard of such a thing that we Muslims cannot pray to God if we touched a dog! The first time I ever heard that was when I came to the U.S. (from other Muslims from ME countries and Africa). Some of them say that if you touch a dog, you must take a full bath/ablution, change all your clothes and then you are allowed to pray. They claim that it is the islamic belief and that it must be done like that.
Well, no where in the Holy Qur'an did I find such a claim. Plus, it is amazing to note that a dog was mentioned in the Holy Qur'an (he was one among the group of the sleepers in the cave). Imagine that! True believers, protected by God, and their dog with them! If a dog is such a 'bad' creature for Muslims, wouldn't God ensure that it is clear in the Holy Qur'an? Why would he allow a dog to sleep with the sleeper sin the cave?
A hadith supposedly states that any dog is susceptible to an attack by shaitan/a jinn because a dog is very close to human. Well, so is a cow, a sheep, a dunkey, any domestic animal that humans keep close contact with. So does that mean that a Muslim farmer who milks his cow every day needs to take a full bath, ablution, change all his clothing before he starts his prayer?
We Muslims need to seriously take a look at the Holy Qur'an and those hadiths that simply appear to contradict the Holy Qur'an.
this is obviously a cultural bias, even if it is helped by religious mentality
now that standards of living have somewhat improved in relatively developed nations and urbanised areas, it is normal for humans to live with dogs
before that it was normal for dogs to be kept as guard dogs, war dogs or shepherds, so called work dogs, maybe an ocasional rich family might have had some pets
other dogs were mostly strais, vich generally are not of the best health and look dirty, even if they are often not that "unclean", unless seriously ill or contaminated, and can sometimes be dangerous
but more important than that is the general religious sentiment, a thing of mentality not scripture, that causes such species of animals to be given negative connotations and all kinds of negative beliefs connected to them
similarly there is nothing in the bible that says anything relevant about cats
still cats were traditionally considered undesirable, unclean, even dangerously satanic, in many christian cultures, all the more idiotic as in those times cats were the only practical pest control
similarly some strains of hindu thought consider dogs, cats, pigs etc... to be unclean, as opposed to say cows, or rats, wich are sacred
in general the "spiritualy undesirable" animals are usually ones living close by, such as cats, dogs, pigs, or rabbits, also wolves, bears, and large cats are sometimes considered as personification of natural evil, or even devil himself, and vultures in general and hienas in particular are specifically detested
this folows a couple of standard asumptions or observations;
that such animals and animals in general are suceptible to attacs of believed evil spirits and or demonic possesion and so should be considered unvanted, big time paranoia in most pre-industrial cultures
that such animals are considered unclean as these beliefs formed in times when little was known of how disease works and what makes people ill, so people were paranoid, and strais being dirty did not help
that such animals do things that religious people are told to consider disgusting, improper or sinful, such as copulate in public, eat excrement(dogs), eat carrion, behave "wildly", lick their private parts, eat their babies, etc...
from a psyhoanalitic point of view, an animal of any kind, especially a dog, cat, or pig, can be seen not just unclean or unsafe for rational reasons of hygiene, but as personifications of the id, or even shadow, but at the same time these animals show a kind of life and vigour, and freedom, making them impossible to control, and so are even more demonised, and feared, as irrational as that might sound, and draw on themselves all kinds of irrational condemnation and superstition
or in the basic example in the question, a religious person will consider himself unclean in a percieved spiritual sence, if he has touched an animal he is taught by his culture, not necessarily his religion, to be low, unclean, perverted etc... again in a percieved spiritual sence, weather the dog is clean or not is not important, it is the idea of a dog that is percieved as "unclean"