Please I need some clarification. If God does not like dogs to be kept as pets, why did he create them to be loving and caring? Why is it not in the Quran that having a dog pet is Haram?
I learnt a prostitute woman gave water to a starving dog and God forgave her sins and she went to heaven:
Allah's Messenger said, "A prostitute was forgiven by Allah, because, passing by a panting dog near a well and seeing that the dog was about to die of thirst, she took off her shoe, and tying it with her head-cover she drew out some water for it. So, Allah forgave her because of that." (sunnah.com)
It says in the Quran:
It is We who relate to you, [O Muhammad], their story in truth. Indeed, they were youths who believed in their Lord, ...
We would have certainly spoken, then, an excessive transgression. These, our people, have taken besides Him deities. ...
He whom Allah guides is the [rightly] guided, but he whom He leaves astray - never will you find for him a protecting guide. And you would think them awake, while they were asleep. And We turned them to the right and to the left, while their dog stretched his forelegs at the entrance. If you had looked at them, you would have turned from them in flight and been filled by them with terror. -- Qur'an 18:13-18
The dwellers of the cave were with their dog. God called them "true muslims" (surah Kahf).
It says only in the hadith that a dog pet is not allowed in Islam. E.g.
The Prophet said, "Whoever keeps a (pet) dog which is neither a watch dog nor a hunting dog, will get a daily deduction of two Qirat from his good deeds." (sunnah.com)
My Imam told me anything that contradicts what the Quran says is untrue. Therefore, is that hadith about dogs untrue? Because it clearly contradicts the Quran.