Why are dogs not allowed?

It was narrated from Abu Hurayrah (RA) that the Prophet (PBUH) said: “Whoever keeps a dog, except a dog for herding, hunting or farming, one qiraat** will be deducted from his reward each day” (Muslim, 1575)

**In the context of the Hadith it generally refers to a ‘known amount of reward in the court of Allah.’  A qirat can therefore be translated as ‘a portion’, with its exact extent being known only to Allah.