Why was the Oral law written down?

משמת יוסי בן יועזר איש צרידה ויוסי בן יהודה איש ירושלים בטלו האשכלות שנאמר (מיכה ז, א) אין אשכול לאכול בכורה אותה נפשי

When Yose ben Yoezer of Tzreida and Yosei Ben Yehudah of Jerusalem died, the Eshkolot ceased to exist...

האשכולות - מפרש בגמרא שהכל בהן עד ימיהן לא היה מחלוקת בחכמי ישראל כולן היו אומרים דברים כנתינתן למשה מסיני והן הראשונים שנחלקו בסמיכת קרבנות ביום טוב כדאמרינן בחגיגה (דף טז.) והוא היה מחלוקת ראשון שהיה בישראל בדברי תורה:

Eshkolot- until their days there was never a dispute (machloket) among the sages of Israel. They all would say things [exactly] as they were given to Moses at Sinai and they were the first to dispute...this was the first dispute among Israel on the words of the Torah.

בימי רבי נשנית משנה זו - הא דקתני תלמוד אין לך מדה גדולה מזו לפי שמשרבו תלמידי שמאי והלל שהיו לפניו שלשה דורות רבו מחלוקות בתורה ונעשית כשתי תורות מתוך עול שעבוד מלכיות וגזירות שהיו גוזרין עליהן ומתוך כך לא היו יכולים לתת לב לברר דברי החולקים עד ימיו של רבי שנתן הקב"ה לו חן בעיני אנטונינוס מלך רומי כדאמרינן בעבודה זרה (דף י.) ונחו מצרה ושלח וקבץ כל תלמידי ארץ ישראל ועד ימיו לא היו מסכתות סדורות אלא כל תלמיד ששמע דבר מפי גדול הימנו גרסה ונתן סימנים הלכה פלונית ופלונית שמעתי משם פלוני וכשנתקבצו אמר כל אחד מה ששמע ונתנו לב לברר טעמי המחלוקת דברי מי ראוין לקיים וסידרו המסכתות דברי נזיקין לבדם ודברי יבמות לבדם ודברי קדשים לבדם וסתם נמי במשנה דברי יחידים שראה רבי את דבריהם ושנאן סתם כדי לקבוע הלכה כמותם לפיכך אמרו בגמרא אין לך מדה גדולה מזו שיתנו לב לטעמי המשנה:

In the days of Rabi this Mishna was said- ...When the students of Shamai and Hillel that were before him three generations increased, disputes about Torah proliferated and it became like two Torahs. [this was] because of the yoke of bondage of exile and the decrees that were decreed upon them and because of this they were not able to focus on clarifying the disputes until the days of Rabi, who God gave him the ability to charm Antoninus the King of Rome....and they were able to rest from their troubles and he sent for and gathered all of the students of Israel and until his day there were no organized tractates rather every student that heard something from the mouth of someone greater than him taught it to others and made signs for it and said such and such a law I heard from such and such a person. and when they gathered every person said what they learned and they worked on verifying the reasons for the dispute and understanding who's words are worthy of being kept and they organized the tractates; the words of Nezikin (damages) on their own...the words of Kodashim (holy things) on their own....