One of the fundamental teachings of Islam is that all legal rulings are based on the real benefits and harms behind them. If there were no benefits or harms, there would be no commands nor prohibitions, and no ruling regarding the najasah and taharah of things in religion.
The issue of the najasah of the dog is a legal issue established by traditions and consensus of the scholars.
Imam Sadiq (as) was asked about the dog. The imam answered: “It is najis. Throw away the leftover [water] of the dog and don’t perform wudu with it. First rub the container of the water with soil and then wash it with water [if you wish to make it tahir].”
This point is necessary to be noted, that it is one of the fundamental teachings of Islam that legal rulings are based on the real benefits and harms behind them. If there were no benefits or harms, there would be no commands nor prohibitions, and no ruling regarding the najasah and taharah of things in religion. 
So whenever we see that the Lawmaker, the exalted, has made something wajib, we can conclude with certainty that there is a benefit in it for us that we are in need of securing, although we may not know what it is exactly.
If the Lawmaker, the exalted, prohibits something and announces it to be najis, we can be sure that there is a harm and disadvantage in it that we must avoid. Nevertheless, because of the development of science, some of these benefits and harms have been discovered, as is the case with some of the reasons behind the najasah of the dog. Today, it is asserted that dog stool contains very tiny tapeworms ranging from two to seven millimeters in length by the name of “ taenia echinococcus ”. When dogs defecate, a large number of eggs of this worm are expelled also, and many stick around the anus. Using its tongue when cleaning itself, the dog spreads this worm all over its body, parasitizing everything. If one of these tapeworms makes its way into a human’s intestine, it can disastrously be the cause of a great deal of diseases that can sometimes even be fatal. 
This is one of the reasons why Islam has announced the dog to be a najis al-ayn (a najis thing in and of itself) in order to block the harms that can be entailed. Nonetheless, there might be other reasons as well, such as hygienic, environmental or medical ones that are yet to be discovered.
The legal evidence for the najasah of the dog:
The najasah of the dog is a legal issue. In the Quran, nothing has been said regarding the najasah of the dog and pig. But, it is totally wrong to think that all legal rulings have been and must be specifically addressed in the Quran. The Quran has kept it at the general fundamentals when it comes to legal rulings, leaving their expansion and interpretation to the prophet (pbuh), and after him, to the infallible imams (as). For example, when we look at the rulings of prayer, we see that there are many detailed rulings, while the Quran has only mentioned a few of them. As for the legal evidence for the najasah of the dog:
1- Consensus: The great Islamic jurists all agree that the dog is a najis thing; this ruling is consensual among them. 
2- Hadiths: The consensus mentioned above, is a result of the many hadiths cited in hadith sources. Of course, r egarding the najasah of the dog, the hadiths that have reached us can be divided into two categories; ones that contain the term ‘najis’ in them and others that don’t have the exact term but nonetheless necessitate their najasah. In these hadiths, the najasah of the dog can be concluded judging from the questions that the imams have been asked regarding the leftovers of a dog and the corresponding answers they have given; here are some examples:
a) Imam Sadiq (as) was asked about the dog. The imam answered: “It is najis. Throw away the leftover [water] of the dog and don’t perform wudu with it. First rub the container of the water with soil and then wash it with water.” 
b) Ibn Shurayh asked Imam Sadiq (as) about the leftover of the dog, and the imam replied: “No, by Allah, it is najis.” 
c) Abi Suhayl asked Imam Sadiq (as) about the dog, and his eminence repeated three times: “The dog is najis.” 
 Mutahhari, Murteza, Majmu’eye Asar, vol. 20, pg. 52, Sadra Press, fifth edition, 1380 (2001).
 al-Minar Magazine, sixth year, pg. 307.
 Rohani, Seyyed Sadiq, Fiqh al-Sadiq, vol. 3, pg. 281, the software of this book entitled Mowsu’ah al-Imam al-Rohani; Najafi, Muhammad Hasan, Jawahir al-Kalām , vol. 5, pp. 366-368, seventh edition, Beirut, Daar Ihya’ al-Turath al-Arabi.
 Hurr Amili, Muhammad bin al-Hasan, Wasa’il al-Shi’ah, vol. 3, chapter 12 of the chapters on najasah, hadith 6, Daar Ihya’ al-Turath al-Arabi, Beirut.
 Wasa’il al-Shi’ah, vol. 3, chapter 12 of the chapters on najasah.