In terms of why they are not all one body of text, what is the difference between Mishna, Baraisa, and Tosefta?
The Mishna is the refined and concise edit of oral torah discussion of the Rabbis of the Tannaic period. It was compiled by Rabi Yehuda Hanasi, after the understanding was reached that the oral Torah must be written down to prevent important parts of it being forgotten, although ideally it should have remained oral. In the Mishna, Rebi (short for Rabi Yehuda Hanasi) included the Rabbi's opinions which he saw most clear, and cited the opinion which he believed was most concrete first, unnamed, so that learners not refrain from concluding Halachah according to that opinion out of concern that it may only be a singular opinion. He aimed to be as brief and as to the point as he could - as the sages tell us (Pesachim 3b) לעולם ישנה אדם לתלמידו דרך קצרה - one must always strive to teach his student the abridged version. Rashi explains there, since the abridged version will be easier to memorise.
However, with the decline of the generations it was harder for us to grasp the true meaning and understanding of such an abridged abridged compilation. Thus the Amoraim Rabbis had to assist in translating and determining the meaning of alot of Mishnas. In fact, the name Amoraim means "translators" in Aramaic, as that it the role they fulfilled. Many times, the used 'Braitas' to help understand, or refute an understanding of the Mishna, literally meaning 'external', as they are the teachings from the Tannaim which didn't make the final cut into the Mishnah. The Tosefta is one such compilation of teachings.