The answer to this doubt:
First, the previously mentioned Hadiths and traditions do not represent the complete truth, but they represent only one aspect of it because there are other Hadiths indicate the premissibility of writing down Hadiths which took place in the time of the Prophet (peace be upon him). Moreover, there was an explicit command of writing down Hadiths as done by the Companions, the Followers, and those who came after them; these Hadiths and traditions are as follows:
1- `Abdullah ibn `Amr (may Allah be pleased with them) said: "I used to write everything which I heard from the Messenger of Allah (peace be upon him) with the intention to memorise it. However, Quraysh prohibited me to do so and said: Do you write everything that you hear from him while the Messenger of Allah (peace be upon him) is a human being: He speaks in anger and pleasure? So, I stopped writing. Then I mentioned it to the Messenger of Allah (peace be upon him), who pointed with his finger at his mouth and said: Write, by Him in Whose Hand my soul lies, only right comes out from it. (1)
2- Abu Hurayrah (may Allah be pleased with him) narrated that the people of the Khuza`ah tribe killed a man of the tribe of Layth in the Year of opening Makkah as a retaliation for one whom they had killed (whom the people of the tribe of Laith had killed). It was reported to Allah's Messenger (peace be upon him). He mounted his camel and delivered this speech: Verily, Allah held back the (killing) or Elephants from Makkah, [doubt from the narrator] and gave its domination to His Messenger and the believers. Behold, it was not violable for anyone before me and it will not be violable for anyone after me. Behold, it was made violable for me for an hour of a day; and at this very hour it has again been made inviolable (for me as well as for others). it is not allowed to uproot its thorny shrubs or to uproot its trees or to pick up its Luqatta (fallen things) except by a person who will look for its owner (announce it publicly). And if somebody is killed, then his closest relative has the right to choose one of the two the blood money (Diyya) or retaliation having the killer killed. In the meantime a man from Yemen came and said: "O Allah's Messenger! Get that written for me." The Prophet (peace be upon him) ordered his Companions to write that for him. Then a man from Quraysh said: "Except Al Idhkhir (a type of grass that has good smell) O Allah's Messenger, as we use it in our houses and graves." The Prophet (peace be upon him) said: "Except Al Idhkhir i.e. Al Idhkhir is allowed to be plucked." At the end of the Hadith It was said to Abu `Abdullah: What was written to him? He said: That speech. (2)
3- Abu Juhayfah said: I said to Ali: Have you got any book (which has been revealed to the Prophet (peace be upon him) apart from the Qur'an)? Ali replied: No, except Allah's Book or the power of understanding which has been bestowed (by Allah) upon a Muslim or what is (written) in this sheet of paper (with me). Abu Juhayfah said: I asked: What is (written) in this sheet of paper? Ali replied: It deals with Diyya (compensation, (blood money) paid by the killer to the relatives of the victim), the ransom for the releasing of the captives from the hands of the enemies, and the law that no Muslim should be killed in Qisas (retaliation) for the killing of (a disbeliever).(3)
4- Wahb ibn Munbih reported on the authority of his brother saying: I heard Abu Hurayrah (may Allah be pleased with him) saying: There is no one among the Companions of the Prophet (peace be upon him) more narrating to the Hadith than me except `Abdullah ibn `Amr because he was writing Hadiths, whereas I did not. (4)
5- Abu Qabil Huyay ibn Hani' Al Mu`afiry said: I heard `Abdullah ibn `Amr saying: "While we were sitting around the Messenger of Allah (peace be upon him) writing, the Messenger of Allah (peace be upon him) was asked: Which of the two cities shall be opened for Islam first: Constantinople or Rome? Thereupon, the Prophet (peace be upon him) said: "The city of Heraclius will be opened first." (5)
(1) Reported by Abu Dawud in his Sunan in the book of knowledge, chapter on the Book of Knowledge (3646) with his own wordings. Ad-Darimy also reported the Hadith in his Sunan in the introduction, chapter on those who gave concession in writing knowledge (1 / 125) with his own wordings. Imam Ahmad reported the Hadith in his Musnad (2 / 162, 192) [No. 6510, 6802, 6930, 7020] verified by Ahmad Shakir who said about it: its chain of narration is authentic]. Al Hakim reported the Hadith in Al Mustadrak (1 / 105 - 106) and said: This Hadith is authentic in terms of the chain of transmission and a fundamental proof in writing Hadith from the Messenger of Allah (peace be upon him), however Al Bukhari and Muslim did not report this Hadith. Moreover, Al Bukhari and Muslim used its chain of transmission as a proof except for `Abdul-Wahid ibn Qays who was one of the Sheikhs of the Levant (the region covering Syria, Lebanon, Jordan, and Palestine) and his son `Umar ibn `Abdul-Wahid Ad-Dimashqy, one of the imams of Hadith. Adh-Dhahaby admitted the authenticity of this Hadith in the summary of Al Mustadrak.
(2) Reported by Al Bukhari in the book of knowledge, chapter on writing knowledge (112) and in the book of Luqatah (finding lost things), chapter on how to declare the Luqatah of the people of Makkah (2434) and in the book of Diyat (blood money), chapter on the one whose close relative was killed will have two choices (6880) and Muslim, in the book of Hajj, chapter on prohibiting Makkah, its game, desert, trees, and Luqatah except if someone will search for its owner (3305, 3306).
(3) Reported by Al Bukhari in the book of knowledge, chapter on writing knowledge (111) and in other positions, see No. (1870, 3047, 3172, 3179, 6755, 6903, 6915, 7300).
(4) Reported by Al Bukhari in the book of knowledge, chapter on writing knowledge (113) and At-Tirmidhy in the book of knowledge, in the chapter on Hadiths reported in giving concession for writing knowledge (2668) and said: This is a good and authentic Hadith.
(5) Reported by Ahmad (2 / 176) No. (6645) verified by Ahmad Shakir who said about it: Its chain of narration is authentic. Al Haythamy said in Majma` Az-Zawa'id (6 / 219): Reported by Ahmad, and its narrators are Rijal As-Sahih (narrators of Hadith compiled by Al-Bukhari and/or Muslim) except for Abu Qabil who is trustworthy. Ad-Darimy also reported this Hadith in the introduction, chapter on those who gave concession in writing knowledge (1 / 126) with his own wordings.