According to the Talmud, quoted by Rashi, Bnei Yisroel learned at Marah a lot about Shabbos, the laws of tumah and tahara including the cleansing effects of the parah adumah, and even the details of property law and litigation. This was their "introductory shiur", their entry into the world of "the yeshiva". It came after Hashem had sweetened the bitter waters that they finally came upon after three days without water. Nevertheless the reference to the teachings of "Marah" are alluded rather cryptically, (15:25) "[Moshe] cried out to Hashem, and Hashem showed him a tree; he threw it into the water and the water became sweet; There [Hashem] placed [various laws] and there He tested [them]." Ramban simply translates the pasuk as a reference to the information they need to survive a trip through the desert. Hashem was teaching them coping techniques. While it may be unsatisfying to see even half a pasuk refer to what may be fit for a Boy Scout manual, the obscurity of the Talmud's rendition, as the Ramban himself says, is quite striking. This may be the only time in Torah that a "shiur" is mentioned and the substance omitted from Torah Shebichsav; that we are told that Torah was taught, but not given much more than a clue about what was said.
It follows that Hashem indeed did create a "bais hamedrash" for the sake of learning per se, very different from the pre-exodus teachings which were detailed instructions of the mitzvos at hand. Ramban points out that Rashi had already made this point, as he is careful to say that these laws were given "lehisasek bohen" to involve oneself in their study.
Upon careful consideration and following the Ramban's commentary, there is hardly another way to see it. After all, the Torah laws would not be binding at Marah, if at all, in the same manner as they would be after Har Sinai. Only then, would we be bound with "na'aseh venishma" and the force of "nitna torah venischadsho halocho".
What is the significance of establishing the concept of "leshem Talmud Torah", especially at this time, well before matan Torah? Drawing our attention to the very end of the pasuk, which establishes this bais hamedrash as a "nisayon", a "test", Ramban explains that Hashem was testing our joy and happiness during the study of Torah. Now, bear in mind that in Ramban's thinking, since a divine test cannot be an inquiry to find out that which is not known to Hashem, rather it must be to bring to the fore latent parts of a person that one may not be aware of. Once successfully tested and aware of strengths that may have been heretofore unbeknownst to us, we can incorporate them into our thinking and build and aspire with them in mind. Thus according to Ramban, Hashem wanted us to experience the joy of Torah study. Indeed, the magic of Torah study. Be it the seeming distant laws of the parah aduma or the complex laws of property or the familiar laws of Shabbos, studying them can bring great joy and inner peace. Do we readily understand it and can we rationally explain it? If so, we may not have needed the bais hamedrash of Marah. Only experiencing it can convince one of its realness. That is the magic of Torah, the magic of Marah - ta'amu u'reu ki tov!