This morning I received an interesting question, one that I think might actually be somewhat common among people who are learning about Islam, either to convert or after converting. And it comes up because of the person's background and previous understanding of religion.
The essence of the question, which asks for the purpose of the hadith or the sunnah, reveals the impression of the person asking that they might be like the rulings or dogma of the Catholic church, and correspond to catholic life and behavior. So the questioner wants to understand the differences in the Hadith/Sunnah in Muslim tradition to dogmas/rulings in the Catholic tradition.
What might not be obvious is the tacit impression of the Qur'an in relation to the Bible. Because what the above question assumes is that the Qur'an is actually like the Bible, and therefore Islamic teachings outside of the Qur'an (namely Sunnah) are analagous to extra-Biblical literature.
But in fact, there is absolutely no equivalent to the Qur'an in Christianity. The statement that the Qur'an is the 'Muslim Bible' or something similar is inherently flawed and misleading. Unfortunately I frequently hear Muslims make this incorrect comparison when speaking to Christians (or worse, to other Muslims, permitting the propagation of this misunderstanding.) There might be a temptation to describe the Qur'an like the Bible because Muslims do believe in previous revealed scriptures--the Torah, and the Gospel, for example. And Christians and Jews are called 'People of the Book,' while 'Bible' means 'Book.' But you might be wondering what the problem is with likening the Qur'an to the Christian Bible, so allow me to explain.
The Bible is a collection of texts, spanning centuries, some of which can claim divine inspiration, and some of which cannot. It is not a single revelation like the Qur'an which has been preserved in its entirety as one complete volume. Rather, it consists of two major pieces, the "Old Testament" and the "New Testament,", the development of each taking centuries without any proof or determination to distinguish actual revelation from mere storytelling. The Bible includes, for example, the Torah, but the two terms are not interchangeable. Loosely, we can understand the Torah to be the first five books of the Bible, namely Genesis, Exodus, Leviticus, Numbers, and Deuteronomy, sometimes called the Books of Moses (p). (Can you imagine why?) The remainder of the Old Testament includes other books like the Psalms, and texts known as "Prophets" and "Writings." All these varieties of literature comprise the Old Testament, which was considered to be a single collection during the life of Jesus. Today the same collection of texts is sometimes called the "Jewish Bible." While it includes the Torah, it also includes many other texts and so cannot be equivalently referred to as the Torah.
The second major piece of the Bible is the "New Testament." Some Muslims also make the mistake of referring to the entire New Testament as the Gospel, or the Injeel (a term in the Qur'an meaning Gospel), but once again, the New Testament is also a collection of texts--and not revelation to Jesus (p). In fact, it is simply books written about him, or about or part of the movement after him (which might not even fall under the category of what we know today as Christianity.) Regardless of that point, the New Testament books were all written after Jesus's ascendancy--decades, even centuries (according to some opinions) afterwards, and are not at all revealed, though in general Christians might consider them all to be "inspired" by what they call the "Holy Spirit."
The Qur'an however is a single volume, comprehensively revealed to Muhammad (saws) through the angel Gabriel, who Muslims call the Holy Spirit. And during its revelation which took place during the life of Muhammad, he and his Companions collected it by memory and in writing to preserve entirely. It is, in fact, the Speech of the Almighty--verbatim, revealed through Gabriel to Muhammad (saws.) It is not the words of any human being, or the interpretation of God's words by any human being. So primarily, the nature of the Qur'an is what distinguishes it from the Bible.
Now, the question at hand was not about the differences between the Bible and the Qur'an, however I think that a proper understanding of that distinction is necessary to properly understand the answer which is to follow.
Because the Qur'an is unique even among religious scripture, the proper analogy of the Sunnah should become more profound. Rather than appearing like extra-Biblical literature written after the time of Jesus (p), the Sunnah is more like actual texts in the Bible, which endeavour to describe and explain the teachings of Jesus.
That's right, I said that the Qur'an is unique, and the Sunnah (or Hadith) is kind of like the Bible--specifically like the Gospels of the New Testament.
Why? Because the Sunnah, the Hadith, these are the teachings of Muhammad (saws)--the things he said, the things he did, and what was done in his presence while he approved. And are you thinking, but the Qur'an is the teachings of Muhammad (saws)? Remember what I said before, that the Qur'an is unique in its nature in that it is the Speech of Allaah, His words exactly, perfect and precise. Not the words of Muhammad (saws). But Muhammad (saws) did not utter only the Qur'an. He did not hide in his house and emerge only to recite the revelation which Allah had bestowed on him--he taught his Companions by interacting with them, by sitting with them and talking to them, and traveling with them. His actions were a source of teaching them as well as his words. And that is the Sunnah! After his death (saws), his companions continued to transmit his teachings, his own words, in addition to the Qur'an, although separate from the Qur'an.
And for this reason it's better to understand the Sunnah as his teachings rather than as a book or a collection of narrations, even though we can only understand the Sunnah this way because that is how our scholars have transmitted and verified the sayings which have been attributed to Muhammad (saws).
So after establishing that the Qur'an is unique, the verbatim speech of Allaah revealed through Gabriel to Muhammad (saws), we say that the Sunnah is the teachings of Muhammad (saws) in his words and actions, as witnessed by his Companions, and transmitted to us through their narrations. And what is the purpose of the Sunnah? What is the purpose of the lessons which Muhammad (saws) taught his companions?
The purpose is to teach us Islam, to teach us how to implement Islam in our lives, and to teach us how to understand the Divine Guidance and Remembrance, the Qur'an. It is to permit us to follow the divine injunction in the Qur'an to "obey the Messenger." Because Muhammad (saws) was not sent as a prophet to his companions only or to Arabs only, but he was sent as a mercy to all the worlds, as a messenger for all of mankind.