“Rava bar Machsseya said in the name of Rav Chama bar Gurya in the name of Rav: One who gives a gift to another must inform him” (Shabbat 10b).
As the Tosafists (Shabbat 10b, s.v. hanoten) note, this law applies only if the gift is given as a demonstration of friendship and love. To anonymously give such a gift would be counterproductive, preventing greater closeness between people. However, a gift that is liable to cause embarrassment, such as charity funds, should be given anonymously.
The Gemara derives this law from G-d’s gift of the Shabbat to the Jewish people: “And you, speak to the children of Israel and say: Only keep My Shabbatot, for it is a sign between Me and you for your generations lada’at, to know, that I am G-d Who sanctifies you” (Shemot 31:13). The meaning of this verse, read by many at home this past Shabbat, would be perfectly clear without the words “to know”. Their inclusion allowed our Sages to broaden its meaning beyond the technical laws of Shabbat. “The Holy One, Blessed be He, said to Moses: I have a good gift in My treasure house and Shabbat is its name, and I seek to give it to Israel. Go inform them.”
While pretty much all would agree that giving someone a nice bottle of wine is a worthy gift, the definition of a gift may vary from person to person.
While for most observant Jews it is hard to think of a greater gift than Shabbat, sadly, for most people the laws of Shabbat are nothing less than a big burden. What for some is a gift may be of little value to others. For our Talmudic Sages, for whom being Jewish was synonymous with keeping Shabbat, it was self-evident that Shabbat was a most special gift. Even the ignorant were most appreciative of Shabbat. If not for Shabbat, many a worker would never have had a day off. But many of these same people—think Rabbi Akiva before he became a scholar—had much less appreciation for the study of Torah.
The Gemara relates that Rav Chisda had some very special, rare meat and offered it as a gift to one who could tell him a teaching of Rav that he had not yet heard. Rava bar Machsseya then quoted the teaching he had heard in the name of Rav regarding letting people know about gifts. Rav Chisda gave him the meat. Rava bar Machsseya exclaimed, “Are the words of Rav so dear to you?” When Rav Chisda responded in the affirmative, Rava bar Machsseya responded with a saying of Rav that, “Fine wool is precious to those who wear it." One only appreciates that which one values. One who lacks appreciation for art would not know a masterpiece, even if hanging in one’s own living room. For Rav Chisda, there was nothing more dear than hearing a teaching of his beloved teacher, Rav.
This teaching(s) of Rav takes place in the midst of a discussion about, come afternoon, what activities one may not do until and unless one has davened Mincha, lest the activity take longer than expected, causing one to miss Mincha. Many might simply explain the juxtaposition as the result of the previous teaching—one that is related to the subject at hand, that was also quoted in the name of Rava bar Machsseya in the name of Rav Ḥama bar Gurya in the name of Rav. That one teaching is then followed by no less than eight(!) teachings of Rava bar Machsseya in the name of Rav Ḥama bar Gurya in the name of Rav.
No doubt the Talmud grouped together this series of teachings as they were all taught by Rava bar Machsseya in the name of Rav Hama bar Gurya in the name of Rav, a common and important technique for an Oral Law-based tradition. This is especially so when one notes that these are the only teachings of Rava bar Machsseya in the name of Rav Hama bar Gurya in the name of Rav in the entire Talmud.
Yet, as I have often noted, there is almost always a deeper connection between the teachings than just the identity of the author.
As mentioned above, the original context of these teachings is a discussion about prayer. It seems that the Talmud is hinting at the view later articulated by the Ramban (Sefer Mitzvot #5) that prayer is a great gift from G-d. What greater gift can there be than G-d allowing us three times to petition him over and over, day in and day out, with the same requests? Most can readily see the gift of Shabbat, but it is more difficult to see prayer as a gift. Too often, we see prayer as a burden (Maybe with the privilege of communal prayer currently taken away from us we will better learn to appreciate the gift of prayer).
While there are some gifts that should not be made public, there are others that should never be given in the first place. It is this idea that links the teaching about gift giving to the immediately subsequent teaching of Rava bar Machsseya in the name of Rav Hama bar Gurya in the name of Rav.
“And Rava bar Machsseya said in the name of Rav Hama bar Gurya in the name of Rav: A person should never distinguish one son from other sons. As due to the weight of two sela of fine wool that Yaakov gave to Yosef, beyond what he gave the other sons, his brothers became jealous of him and the matter unfolded and our forefathers descended to Egypt”.
As Tosafot (Shabbat 10b s.v. Hachi) notes, G-d had already promised that Abraham’s descendants would be enslaved for 400 years, so it seems rather unfair to blame Yaakov.
That G-d promised such may be true, but that matters little. We dare not base our actions on what we think G-d may or may not do. “My thoughts are not your thoughts and My ways are not your ways” (Yishayahu 55:8). Just as it is prohibited to rely on miracles (Pesachim 64b)—hence, it is forbidden to go to shul if a doctor recommends otherwise—we need not listen to dire prophecies. In fact, our Sages teach that our positive actions can annul a divine prophecy.
G-d may have told Avraham that his descendants would be slaves, but that is irrelevant. We are to act in such a way that G-d will have no right to punish us and be forced to adjust His prophecies. Had we done so, the Tosafists claim, we may still have ended up in Egypt, but our experience there would have been a much more pleasant one. How sadly tragic when a well-meaning but misguided gift causes so much suffering!
 With Shabbat being a special gift from G-d to the Jewish people, non-Jews are enjoined from keeping Shabbat even, according to some, as they prepare to convert. In a piece of rabbinic hyperbole that has no legal import, our rabbis assert that a “goy sheshavat, non-Jew who rests [on Shabbat], is liable for death” (Sanhedrin 58b).
 Of course, such editing can only work when dealing with lesser-known and quoted figures such as Rava bar Machsseya and Rav Hama bar Gurya.
 This does not necessarily mean that each and every teaching is related, but some, I believe, will always have a connection to the theme at hand. And the later teachings often have a connection to earlier teachings, even as the topic of discussion has begun to change.