The Torah informs us that shortly after singing the famous "Shiras HaYam," the song of praise and glory to Hashem sung by Bnai Yisrael upon crossing to the other bank of the Red Sea, whose waters had miraculously parted to allow them to travel through on dry land and then returned to normal again in time to drown the on-rushing Egyptian army, Bnai Yisrael traveled for three days in the desert without finding any water (שמות ט"ו:כ"ב). The Gemara in Bava Kamma (דף פ"ב.) understands this Posuk metaphorically, explaining that the water referred to here represents Torah, like it does in a Posuk in Yeshayah (נ"ה:א'), as understood by the Beraisa in Avos DeRabbi Nosson (פרק מ"א הלכה א') and by the Gemara in Sukkah (דף נ"ב:, ועיין ברש"י שם בד"ה לכו, ובעמוד א' שם בד"ה השקהו), among other places; the connection between Torah and water is explained by the Gemara in Taanis (דף ז.-ז:), based on that same Posuk (שם), and is codified by the Rambam (פרק ג' מהל' תלמוד תורה הלכה ט').
Based on this metaphoric understanding of the Posuk in our Parsha שמות שם(), the Gemara in Bava Kamma (שם) explains that since Bnai Yisrael had traveled for three days without any Torah, they became exhausted, and, as is added by the Mechilta (פ' בשלח-ויסע פרשה א'), where this discussion is also found, they rebelled. The prophets among them thus instituted that the Torah should be read publicly not only on Shabbos, but on Mondays and Thursdays as well, so that as many as three days would never go by without Torah being available to the public. Tosafos (שם בד"ה כדי) explains that Mondays and Thursdays were the days specifically selected because it was a Thursday when Moshe went up to receive the second Luchos, and a Monday when he came down with them, and since both that ascent and that descent of Moshe were at times when Hashem was accepting of Bnai Yisrael, those were the two weekdays selected for Kerias HaTorah. A similar idea is found in the commentary of the Daas Zekeinim MiBaalei HaTosafos elsewhere in the Torah (דברים י':י'), where it is noted that Moshe came down with the first Luchos on a Thursday and with the second Luchos on a Monday, and this is why those days were selected for Kerias HaTorah. The Kaf HaChaim (אורח חיים סימן קל"ה אות א') adds a Kabballistic basis for reading the Torah on those two days.
Interestingly, it is clear from the Gemara in Bava Kamma שם() that Ezra HaSofer, who of course lived much later on, also played an important role in establishing the requirements concerning public Kerias HaTorah; it was Ezra, for example, who instituted that the Torah should be read on Shabbos at Minchah. As for the institution to read the Torah on Mondays and Thursdays, though, the Gemara (שם) implies that that originated at a much earlier stage, at the time described by the Posuk in our Parsha (שמות שם), while Ezra simply determined that at those times, there would be three people called to the Torah and a total of at least ten Pesukim read. It appears from the Yerushalmi in Megillah (פרק א' הלכה א', דף ג:), however, that it was Ezra who in fact instituted Kerias HaTorah on Mondays and Thursdays, as well as on Shabbos at Minchah; the same idea is stated clearly in the Yerushalmi later in Megillah (פרק ד' הלכה א', דף כ"ט.), where it is taught that while Moshe Rabbeinu instituted the requirements to have Kerias HaTorah on Shabbos, Yom Tov, Rosh Chodesh, and Chol HaMoed, Ezra instituted the requirement to have Kerias HaTorah on Mondays, Thursdays, and Shabbos at Minchah. This view is expressed as well by the Beraisos in Maseches Soferim (פרק י' הלכה א',ב'). It seems from the words of the Meiri in Megillah (בית הבחירה לדף כ"א: שם בד"ה המשנה) that these sources that indicate that Ezra instituted Kerias HaTorah on Mondays and Thursdays disagree with the above Gemara in Bava Kamma (שם) which implies that Moshe Rabbeinu instituted Kerias HaTorah on Mondays and Thursdays; this also seems to be the view of the Maharatz Chayes in Bava Kamma (חדושי מהר"ץ חיות שם בד"ה גמרא) and of the Rashash in Megillah (הגהות וחדושי הרש"ש לדף ה. שם בד"ה גמרא ע"ש), among others.
The Meiri earlier in Megillah (בית הבחירה לדף ב. שם בד"ה ויש מפרשים), however, seems to say that there really is no dispute at all, and that Kerias HaTorah for Mondays and Thursdays was indeed instituted in the days of Moshe Rabbeinu, as is stated by the Gemara in Bava Kamma (שם), but because Ezra expanded the practice, requiring three people to be called to the Torah and at least ten Pesukim to be read, he is credited by the other sources as having instituted the entire practice. Alternatively, the Meiri (שם) suggests, Ezra may have reinstituted the practice which originally had been established much earlier, but somehow got forgotten, and the different sources above may all therefore be correct and consistent. The Ritva in Megillah (חדושי הריטב"א לדף ב. שם בד"ה אלא) states similarly that although Kerias HaTorah on Mondays and Thursdays was indeed originally instituted by the earlier prophets (in the days of Moshe Rabbeinu), this institution did not really take on recognized significance until it was later expanded upon by Ezra, and so there really is no dispute between the above sources; the same idea is found in the Tosafos HaRosh in Megillah (דף ב. בד"ה מתני').
Although the Rif in Megillah (דף י"ג. בדפיו) states simply that Ezra instituted the Kerias HaTorah for Mondays and Thursdays, the Ran (שם בד"ה עזרא), citing the Gemara in Bava Kamma (שם), explains that the Rif (שם), by explicitly mentioning that there are three Aliyos on these days, is referring to the complete, expanded institution, established by Ezra, which requires three Aliyos; the same explanation can presumably be applied to the words of the Rosh in Megillah (פרק ג' סימן ו'), especially in light of his comments in the aforementioned Tosafos HaRosh (שם), and therefore these authorities too can agree that the original practice of Kerias HaTorah on Mondays and Thursdays was established in the days of Moshe Rabbeinu. Similarly, the Magen Avraham (או"ח שם בריש הסימן), whose text here is corrected by the Dagul MeRivavah (שם בד"ה נשמט) and by Rabbi Akiva Eiger (הגהות רעק"א שם בד"ה איתא), among others, cites the words of the Rif (שם) as well as of Tosafos in Berachos (דף י"ג. בד"ה בלשון) which imply that Ezra instituted Kerias HaTorah on Mondays and Thursdays, and raises a question on them based on the Gemara in Bava Kamma (שם); he responds too that the reference to Ezra is because he expanded the practice, establishing the number of Aliyos. Interestingly, the Shittah Mekubetzes in Berachos (שם בד"ה לימא), referring to that Tosafos (שם), writes that Kerias HaTorah was instituted by Moshe and Ezra. The Pri Megadim (באשל אברהם לאו"ח שם בריש הסימן) writes clearly that Moshe instituted Kerias HaTorah for Shabbos, Yom Tov, Rosh Chodesh, and Chol HaMoed, including the number of Aliyos, while Ezra instituted Kerias HaTorah for Minchah on Shabbos, including the number of Aliyos; as for Mondays and Thursdays, Moshe instituted the actual obligation to read the Torah, while Ezra instituted the number of Aliyos.
As pointed out by both the Magen Avraham (שם) and the Pri Megadim (שם), it is clearly the position of the Rambam (פרק י"ב מהל' תפילה הלכה א') that Moshe Rabbeinu instituted the requirement for public Kerias HaTorah on Shabbos and Mondays and Thursdays in order that three days should not pass by without people being able to hear the Torah, while Ezra instituted Kerias HaTorah for Minchah on Shabbos and established that there would be three Aliyos and no less than ten Pesukim read on Mondays and Thursdays. The Kessef Mishneh (שם) takes note of the fact that whereas the Gemara in Bava Kamma (שם) actually states that the Kerias HaTorah of Mondays and Thursdays was instituted by the prophets among Bnai Yisrael, as mentioned above, the Rambam (שם) says that it was instituted by Moshe Rabbeinu; he explains that Moshe was the greatest prophet and that all the others were simply part of his Beis Din, and would not have acted without his approval, and he was therefore obviously responsible for this institution as well. Rav Ovadyah Yosef (שו"ת יביע אומר חלק ד' חאו"ח סימן י"ז אות ג') quotes those who question why, if indeed the Rambam (שם) is correct that Moshe Rabbeinu instituted this practice, the later Yerushalmi in Megillah cited above (פרק ד' שם) does not list Kerias HaTorah for Mondays and Thursdays among the institutions established by Moshe Rabbeinu. He suggests that it is because the practice as we have it today (including three Aliyos) was not really completely established until later, in the days of Ezra, among other answers. He does note (שם), though, that some hold that it was really not Moshe at all who established this practice, but other prophets who were around then, perhaps after the death of Moshe. This is the position suggested as well by the Torah Temimah, commenting on the Posuk in our Parsha (שם אות ל"ד), to explain why this practice is not attributed in the Gemara to Moshe Rabbeinu himself.
The Pri Megadim (שם) also questions the entire need for this institution of Kerias HaTorah on Mondays and Thursdays, pointing out that anyone who recites Kerias Shema daily has been exposed to something from the Torah (and there is therefore no room for concern that days will go by without exposure to Torah); this idea may be based on the statement of the Gemara in Menachos (דף צ"ט:) that one can fulfill one's minimum requirement for daily Talmud Torah by reciting Kerias Shema in the morning and in the evening. The Pri Megadim (שם) thus suggests that apparently, the idea of not letting too many days go by without Torah refers to a deeper involvement in Torah than the recitation of Kerias Shema, and that perhaps the institution was specifically to hear the words of the Torah read from a Sefer Torah. Rav Ovadyah Yosef elsewhere (ספר ילקוט יוסף חלק ב' סימן קל"ה-חיוב קריאת התורה, הערה א') suggests that this institution was designed specifically to enable the Torah to be studied in public, since public Torah study is on a different level than private Torah study. Interestingly, HaRav Yosef Dov Soloveitchik, in a lengthy essay dedicated to this subject of Kerias HaTorah on Mondays and Thursdays (שעורים לזכר אבא מרי ז"ל כרך א' עמוד קנ"ז-קע"ח), suggests that Moshe Rabbeinu instituted that the Torah be read , as an exercise in reading Torah SheBiKesav, which elevates a person's soul and sanctifies him even if he doesn't understand anything, while Ezra then changed the practice, introducing an element of Torah SheB'al Peh to the reading, thus requiring understanding as well, and thereby adding to the number of Aliyos and Pesukim to be read.
The Mishnah in Megillah (דף כ"א.) states clearly that three people are called to the Torah on Mondays and Thursdays; the Rambam (שם הלכה ט"ז) and the Shulchan Aruch (או"ח שם סעיף א') rule accordingly, and the Gemara (עמוד ב' שם) explains that this number hints either at תורה נביאים וכתובים or at כהנים לוים וישראלים. The Ramo (שם) suggests certain circumstances in which one may have additional Aliyos on those days, but the Magen Avraham (שם ס"ק ב') and the Taz (שם ס"ק ב') write that this is not the accepted custom, and the Mishnah Berurah (שם ס"ק ג') and the Kaf HaChaim (שם אות ג'), among others, concur, saying that we never have extra Aliyos on Mondays and Thursdays. The Gemara later in Megillah (דף ל"א:) presents a dispute as to exactly what part of the Torah should be read on Mondays and Thursdays (and Shabbos afternoon); the accepted opinion is that we read the same thing on all of those occasions, namely, the continuation of the place in the Torah at which the Shabbos morning reading concluded, as stated by the Rambam (פרק י"ג שם הלכה ג') and the Shulchan Aruch (שם סעיף ב'). The Gemara earlier in Megillah (דף כ"א:) also indicates that a minimum of ten Pesukim must be read when one takes out a Sefer Torah in Shul, and several sources are suggested for this; the Rambam (פרק י"ב שם הלכה ג') rules accordingly, as does the Shulchan Aruch (שם סימן קל"ז סעיף א'), who adds, based on Tosafos in Megillah (שם בד"ה אין), that if an entire subject in the Torah is covered in less than ten Pesukim, one may read that section alone. This is indeed the practice of the Ashkenazim on Purim, who read only the last nine Pesukim of our Parsha (שמות י"ז:ח'-ט"ז) because it is a unit by itself (עיין ברמ"א לסימן תרצ"ג שם בסעיף ד' ובמשנ"ב שם ס"ק י'). It is also clear from the Gemara (שם) that each Aliyah read must have at least three Pesukim, and the Rambam (שם ובהלכה ד' שם) and the Shulchan Aruch (שם סעיף ב') rule accordingly; the Mishnah Berurah (שם ס"ק ד') notes that the practice today is to read on Shabbos afternoon and on Mondays and Thursdays the whole first Aliyah of the upcoming Parsha, and to stop in designated places, as specified in many Siddurim. It is worth noting that the Mishnah Berurah (שם סימן קל"ה ס"ק א') states that although the principle institution is to read the Torah on Mondays and Thursdays at Shacharis time, if one could not, one may read it any time during the day, although Rav Ovadyah Yosef, in the aforementioned Teshuvah (שו"ת יביע אומר שם בכל התשובה), is uncomfortable with this idea, stressing that one certainly should not make a habit of reading the Torah on Mondays and Thursdays after the time of Shacharis.