Bear in mind that the importance of the 4 basic books (kutub e arba’) for the shias is the same as the importance of the sihah sitta for the ahl us sunna, the difference being that while they claim every hadeeth in the sihah sitta to be sahi(authentic), we make no such claims about every hadeeth contained in these 4 books. It is for the Ulema to investigate and verify the status of each hadeeth. Together the sahi Bukhari and the sahi Muslim contain 7000 ahadeeth, while the Kafi alone contains 16,199 ahadeeth. This, when these two compilers worked in very favorable circumstances, whereas Kulaini worked in a hostile environment, amongst the opponents of Shia Islam, the rulers were against him, and he had no one to help him. Yet he managed to collect more ahadeeth than the compilers of Sahi Bukhari and Sahi Muslim put together.
This was the only book of ahadeeth compiled during minor occultation. Thus it was compiled in the presence of the nominated representatives of the Imam. The 4th and last representative of Imam died shortly after Kulaini’s own death. And, of course the Imam himself was well aware of the existence of this book and also knew that this was going to become a basic book of the Shias. If there was something very wrong about this book, the Imam would have pointed it out or would have forbidden the compilation. But we find that nothing of this kind happened. On the contrary, it is said that Kafi reached Imam e Zamana, and he is reported to have said,”this book is Kafi(enough) for our Shias.”
This is one of the reasons it is called Kafi. However this incident is not proved.
Bear in mind that till the time of the 11th Imam, the Shias were not overly concerned about preserving ahadeeth, because whenever they were faced with a problem an Imam was there to solve it. Even during the initial stages of the minor occultation, they had recourse to the Imam through his nominated representatives. But when Husain bin Rouh was appointed the representative, the Shias grew concerned as their Imam was in occultation and Hussain bin Rouh was in taqayyah on the orders of the Imam. It was at this time that Kulaini migrated to Baghdad , and since he was the Shaykh ul Fuqaha, it fell upon his shoulders to assume the responsibility of collecting and preserving the ahadeeth.
First he collected whatever he could of the 400 books of Usool. Then he sorted them topic-wise. Remember that the students of the Imam would spend the whole day with the Imam and would write down all the queries answered by the Imam, without arranging the material topic-wise. Thus every page was a jumble of topics ranging from Greek philosophy to Indian medicine to salat to beliefs of Islam etc. However, given the circumstances even noting down the queries and their answers was a major achievement. Next, Kulaini himself traveled all over the Islamic world to collect ahadeeth. As soon it would come to his notice that a person in a particular village knows a hadeeth, he would go to that village, even if it entailed journeying over great distances, to hear it from him personally and write it. He refused to appoint anyone else to go in his stead, so that he could be sure that the written hadeeth tallied word for word with what was related by that person. This process went on for 20 years. Thus the kafi came into existence. After Kulaini, this type of work was done by others too, but Kulaini was the first to undertake this task. Today no mujtahid can issue a fatwa without studying every hadeeth of the Kafi. He compiled the book and gave it to his students. During those times writing was not popular, because it was very difficult to get paper and ink. Thus the preferred method was oral transmission. Hence Kulaini would read out the ahadeeth to his students and they would memorize them. Then the students would recite the ahadeeth and he would hear them. When he was satisfied that a student had learnt all the ahadeeth, he would give the student permission to narrate them on his authority. This permission was called Ijaza e Riwayat, and was an important permission in those days. Thus his students were instrumental in spreading these ahaheeth, till such a time when printing became popular and books began to be printed.