I do not know if this is true or not, but when I was a young boy (year 3 at school and Muslim) a mischievous old man (lol he was actually a friend of my Grandpa) said " All Arab Nomads back then (i.e. in the time of Mohmmad) had dogs for protecting their livestock, and the only reason mohammad all of a sudden decided dogs were Haram, was because at night he tried sneaking into a house of some lady for sex, but the dog started barking and thus alerting neighbours ..etc so he decided it was safer for his future visits to women > to label them as Haram. "
Reading stuff on Mohammad though, it seems very likely that, that is in fact what happened LOL