An embittered situation
ויבאו מרתה ולא יכלו לשתת מים ממרה כי מרים הם על-כן קרא-שמה מרה: ויצעק אל-יקוק ויורהו יקוק עץ וישלח אל-המים וימתקו המים שם שם לו חק ומשפט ושם נסהו
[The Jews] arrived at Marah, and they weren’t able to drink the water at Marah, as it was bitter. Therefore, the place was called Marah. [Moshe] cried out to Hashem, and Hashem showed him a piece of wood. [Moshe] threw the wood into the water, and the water became sweet. There [Hashem] placed for them a decree and an ordinance, and there He tested them
The episode of Marah is short and sweet. The Jews, after traveling for three days, had run out of water. They were hoping to drink from the water sources that they found at Marah. The problem was the water there was too bitter to drink. Moshe threw a piece of wood into the water, and it miraculously became sweet. Right afterwards is a vague verse. The Torah says that Hashem gave the Jews חק ומשפט, a decree and an ordinance. Our Sages teach us this means that at that time they were introduced to a few mitzvos to be involved with: Shabbos, Parah Aduma (the laws of the Red Heifer used for ritual purity), and monetary laws . They would receive the rest of the Torah when they arrived at Mount Sinai.
We could ask why they were given specifically these three mitzvos. However, the one that stands out the most is Parah Adumah. It’s the only one that didn’t apply at that time. The mitzvah of Parah Adumah is to take a completely red heifer, slaughter it and burn it into ash. Those ashes are then mixed with water. This mixture is used to purify those who became spiritually impure due to contact with the deceased. The whole procedure has many steps, and the whole concept involves many complex laws. We are taught that the first Parah Adumah ash which was produced was in the Jews’ second year in the wilderness, when the Mishkan was erected. If so, why were they given the mitzvah so much earlier? It could have waited to be taught with the rest of the Torah at Mount Sinai.
Hashem wanted to teach them an additional lesson, besides that of the Parah Adumah. Right before they were taught these mitzvos, they had a water dilemma. The arrived at Marah, and all the water tasted bitter. Hashem wanted to teach them that this actually wasn’t so. The waters themselves weren’t bitter. Rather, it was their sins which caused the water to taste bitter. Our Sages teach us that when the Torah says they went three days without water, it can be read metaphorically as referring to Torah. The Torah is compared to water, and this is telling us that they went three days without learning. This was considered a sin on their part.
Their sin affected the taste of the water, as alluded to in the verse, כי מרים הם, for they were bitter. Normally, this is read to mean the waters were bitter. However, it can also mean the Jews were bitter. They couldn’t drink the water because they themselves were bitter, due to their sin. The Jewish people used to be so sweet, but their neglecting the Torah took that away. How did teaching them the mitzvah of Parah Adumah help them realize this? What is it about that mitzvah that conveyed that they themselves were bitter, not the water?
If we analyze the detailed laws of Parah Adumah, the answer will become clear. There are certain things which disqualify the water which is to be mixed with the ashes of the Red Heifer. One of them is if the water changes into something else. However, that’s only if the water changed due to some foreign substance. If water changed on its own, it’s still fit for use. Now, in the case of the water of Marah, what happened when Moshe threw into it the piece of wood? It became sweet. If the Jews would want to use this water for Parah Adumah, would it be disqualified? It changed from what it used to be. Seemingly, since it was the piece of wood that changed it, it would be disqualified. This creates a problem. However remote, there should be a concern that someone might store the water for Parah Adumah. How could Hashem perform a miracle which could lead to negative halachic consequences?
Like we said, Hashem’s intent with this miracle, and subsequently teaching them the laws of Parah Adumah, was to show them that their sin of neglecting Torah study created the bitterness. It wasn’t the water. Consequently, it wasn’t something else which made the water sweet. It wasn’t the piece of wood. The water was always sweet! It never became bitter. It was the Jews who became bitter. Studying the laws of Parah Adumah helped them realize that the water was actually fit for use. This study was the solution to their problem. They would become sweet by starting to learn Torah again. Hashem gave them mitzvos to be involved with to rectify their sin. He also chose Parah Adumah as one of them, to teach them this lesson.
We can also learn a lesson for ourselves from this episode. The water tasting bitter to the Jews because they themselves were bitter is not a one-time blip in history. It’s something that happens to each and every one of us, all the time. We go through situations with a certain attitude, and that attitude paints our experience. If we approach something negatively, it’s very unlikely we’ll feel positive towards how it went. We see from here just how important attitude can be. If someone is embarking on a new venture, or commencing something unfamiliar, attitude is everything. If it’s approached positively, everything will be painted in a positive light. Why set ourselves up for failure? We could make things much easier for ourselves with a small emphasis towards a change in attitude.
 Based on Maharil Diskin to Exodus 15:25
 Exodus 15:23,25
 Pun intended
 Sanhedrin 56b and Mechilta to v. 25, brought by Rashi ad. loc. The version of Maharil Diskin Al HaTorah that I used for some reason cited Sanhedrin 40
 Rashi loc. cit. Targum “Yonasan” ad. loc. writes honoring one’s parents instead of Parah Aduma. Indeed, this is what Sanhedrin loc. cit. has. The question is where Rashi got Parah Aduma. The Mechilta loc. cit. actually brings a dispute what was commanded at Marah. Rabbi Yehoshua says they were commanded in Shabbos and honoring one’s parents, whereas Rabbi Eliezer HaMoadi says they were commanded in forbidden relationships and Dinim. The gemarra therefore seems to be a merger of the two, excluding forbidden relationships. However, neither mention Parah Aduma. Torah Temimah ad. loc. § 36 wants to suggest that a typo fell into Rashi. The latter originally wrote כ”א, which stood for kibud av v’eim, honoring one’s parents. What happened was the כ was mistakenly copied as a פ, and someone thought פ”א stood for Parah Adumah, and expanded the abbreviation in the text. However, the sefer Yosef Hallel ad. loc. strongly argues against this approach. We see Rashi to Exodus 24:3 lists both Parah Aduma and honoring one’s parents as mitzvos which were commanded at Marah. So we can’t say there’s a typo. Emes L’Yaakov ad. loc. also brings this proof against this suggestion. Yosef Hallel adds we see other Rishonim mention Parah Adumah as well, like the Ramban and Ba’al HaTurim to Exodus 15:25. We even see Eliezer HaKalir, who was much earlier than Rashi, writes in his piyut for Parshas Parah: ממרה חקה גזר. He concludes that it must be they had some Midrash which we don’t have. Torah Sheleimah ad. loc. § 269 brings from Seder Olam Zuta a Midrash that says like Rashi. However, see his Miluim § 11, where he decides this isn’t the source for Rashi, as it probably was amended to fit with Rashi. He also asks on the Torah Temimah’s suggestion like those above
 The Rambam in Sefer HaMitvos Aseh § 237-246 counts 10 mitzvos related to monetary laws. The Ramban ad. loc. Shorashim § 14 initially wanted to include them all in one mitzvah, from the verse ושפטו את העם משפט צדק (Deuteronomy 16:18). He even cites the verse we started with as support. However, in the end he concurs with the Rambam. The Zohar HaRakiah Aseh § 15, 53 (Mitzvah § 144) actually counts them all as one mitzvah
 Gittin 60a
 Mechilta to Exodus 15:22; Midrash Tanchuma Beshalach § 19; Midrash Lekach Tov to v. 23; Bava Kamma 82a; Yerushalmi Megillah 4:1; Yalkut Shimoni Beshalach § 255. The Maharil Diskin cites Sifri, but I couldn’t find it. This idea also appears in Zohar II parshas Beshalach p. 60a. See there, where it addresses the issue that they hadn’t received the Torah yet, so how could they have been expected to learn it
 Isaiah 55:1
 This is an idea made famous by the Kotzker Rebbe. It’s surprising that the Maharil Diskin doesn’t cite him. Although, I believe the former is understood to mean that the Jews had a bitter attitude, so the water tasted bitter. The Maharil Diskin takes a slightly different approach, saying the Jews were “bitter with sin”
 Parah 8:11
 The Maharil Diskin cites Mechilta to Exodus 15:25 as support for this interpretation: מרים היו לפי שעה ונמתקו. See there further