While our Holy Prophet Muhammad (Peace be upon him) used to teach his companions about the various issues regarding our daily life in the light of Islamic Shariah, there was no need to compile anything from his teaching. All of his companions were eager to know more and more about Islam. They could contact the Holy Prophet at any time. The persecutions of the people of Mecca were increasing day by day against the Muslims and they were a small group in Mecca who couldn’t continue preaching and educational activities there. It was a big hurdle as well. Another reason was prevention from the holy Prophet Muhammad (Peace be upon him). The Holy Quran was revealed directly on our Holy Prophet Muhammad (Peace be upon him) but it was a bit difficult for a common Muslim to differentiate between the Holy Quran and Hadith. It is because it was prohibited initially to write down the hadith. Although, later on, there were about 40 companions who were assigned a duty to write down the revelations of the Holy Prophet Muhammad (Peace be upon him) but before that most of the hadith literature was preserved by memorizing only.
Although the compilation of the Holy Quran was completed in the time of Hazrat Abu Bakar and the Hazrat Usman had sent the true copies of the Holy Quran to different areas of an Islamic state but the compilation of the hadith was not done till the time of Hazrat Umar bin Abdul Aziz. Hazrat Umar bin Abdul Aziz wrote a letter to the governor of Medina in which he asked him to compile all the available hadith of the Holy Prophet Muhammad (Peace be upon him). Hazrat Umar bin Abdul Azz wanted to start the formal education system to teach the Holy Quran, Hadith, Sunnah, Fiqah and Tafseer, etc. many people traveled to Medina from different distinct areas to learn from the companions of Holy Prophet Muhammad (Peace be upon him). For the compilation of hadith, many of the scholars traveled miles and miles to collect even a single hadith. After collecting hadith, scholars analyzed through strict criteria before adding in their compilations.
In the time of the followers of the companions of our Holy Prophet Muhamad (Peace be upon him), the issue of the compilation of the hadith was taken seriously and some people, who were eager to collect the hadith, tried their best for this purpose. In their era, there was not only the collection of hadith was done but verdicts and the sayings of the family of our Holy Prophet Muhammad (Peace be upon him) were also compiled.
The time of the followers is considered as a golden period as the literature of hadith flourished a lot. In this time the six most authentic books were written which are known as Sihah-e-Sitta. After the Holy Quran, Siha-e-Sitta is considered the most authentic books for Muslims. These are the books that are followed by Muslims all over the world while receiving religious education.