Even the Chabad site clearly explains that what we have today published as the Zohar is a compilation of stories passed down through the Mesorah of Kabbalistic Rabbis of the ages.
http://www.chabad.org/kabbalah/article_cdo/aid/380596/jewish/Rashbi-Works.htmThe Zohar is known as the primary text of the Kabbala. Its pre-eminent place in Jewish mysticism does not derive solely from its antiquity or its authorship. Other basic works of the Kabbala, like Sefer Yetzira and Sefer Habahir, are of earlier origin. The Zohar's importance must rather be attributed to its comprehensiveness, becoming the source for practically all the later authoritative Kabbalistic teachings of the school of R. Yitzchak Luria and others. Shalshelet HaKabbala (pg. 31b)holds that the Zohar currently in our possession is a mere fraction of the original work and maintains that entire work of the Zohar was so large that it would constitute an entire camel-load.
The Zohar itself attributes its disclosure of the Torah's mysteries to R. Shimon bar Yochai (known by the acronym "Rashbi"), the second-century Tanna who is the central master in the Zohar, and his disciples ("Chevraya" in Hebrew), including his son R. Elazar, his scribe R. Abba, R. Yehuda, R. Yossi ben Yaakov, R. Yitzchak, R. Chizkiyah, R. Chiya, R. Yossi, and R. Yaakov bar Idi. (Tikunei Zohar 1a; Zohar Chadash, Tikunim, 93d) Rabbi Shimon himself apparently wrote some of the Zohar, described as "the First Mishna," (Chabura Kadmaa mentioned in Zohar III, p. 219a ) while hiding in a cave from the Roman authorities who wanted to execute him. The Zohar affirms that one of Rashbi's foremost disciples, Rabbi Abba, recorded the bulk of his teachings (Zohar II, 123b. See also ibid. III, 287b and 296b ). In addition, early sources state that the composition of the Zohar extended over the period of Rashbi, his disciples and their disciples, who recorded many of the teachings passed on orally from Rabbi Shimon to his close associates and disciples.1
Thus its authorship spanned several generations.
The present form of the Zohar, in order of the parshiyot of the Torah, is of a much later date, most likely from the period of the Geonim, and there are some interpolations from these late editors.2
The Zohar was concealed for many centuries, as the study of the Kabbala was restricted to a select few qualified individuals. It became revealed only in the thirteenth century and was published by one of the leading kabbalists living in Spain, Rabbi Moshe de Leon. Some believed that the Ramban (Rabbi Moshe ben Nachman c. 1194-1270 CE), himself a renowned Kabbalist, had sent the Zohar from Israel by ship to his son in Catalonia, but the ship had been diverted and the texts ended up in the hands of Rabbi Moshe de Leon (Shem HaGedolim, Chida Sefarim, Zayin, 8). Others explained that these manuscripts had been hidden in a vault for a thousand years and had been discovered by an Arabian king who sent them to Toledo to be deciphered. Some maintained that Spanish conquistadors had discovered the manuscripts of the Zohar among many others in an academy in Heidelberg (Shem HaGedolim, ibid.). Other explanations have also been offered. The mystics ascribe special potency to the study of the Zohar: it effects a nullification of evil decrees, eases the travails of exile, hastens the redemption, and draws forth divine effluence and blessings (See R. Abraham Azulai, Foreword to Or Hachamah, p. 2d). There is great merit even in the mere recitation of the sacred texts of the Zohar, even though one does not understand them (R. Chaim David Azulai, Moreh Be'etzba II:43).