Rabbeinu Chananel (brought in Tosfos there) had a kabbala from the time of the Geonim that related exactly what it was that Reb Yosef saw. Reb Yosef saw Shmuel sitting as a talmid in front of R Yehuda, who was his student in life. Tosfos says the reason for this reversal was the the event brought in Shabbos 51a, where a woman "tza’akah," cried for attention to her plight in front of Shmuel, and he ignored her. R Yehuda asked him, "Rebbi, how do understand the passuk in Mishlei אטם אזנו מזעקת דל גם הוא יקרא ולא יענה?" (He who blocks his ears from the cry of the poor, he, too, will cry out and not be answered.) Shmuel answered that the authority there was a local beis din, and, as the Mahrsha explains, he felt that under the circumstances, his limud hatorah was not nidcheh, since there were others who should and would take care of her.
This is, of course, a tremendous mussar haskeil– there is no excuse to ignore the suffering of those who cry to you. Even if you can't do anything for them, even if they would be best served by going elsewhere, you have to show them sympathy, to be Nosei Be'Ohl im Chaveiro, to carry their burden with them. Shmuel was diminished by becoming subservient to his talmid, R Yehuda, who reproved him for ignoring the woman.
But there is a far greater chiddush in Tosfos.
The tremendous chiddush in the Tosfos is that the schar for being nosei b’ohl im chaveiro is not that Rav Yehuda had a more beautiful table in Gan Eden, or that his chupah was more glorious, or that his perfumed rivers smelled better. The result of his behavior-- and I wouldn't even characterize it as a reward, just the natural result of his middos-- was that he was Rosh Yeshiva, and Shmuel listened to his shiurim. We see that even though in this world Shmuel was the rebbi, in the Olam Ha’Emes, Rav Yehuda’s Torah was more chashuv. His Torah itself became more chashuv. Apparently, in the Olam Ha’Emes the pnimius of Torah becomes more important than the level of scholarship, to the extent that his shiurim were better. We see from here that the Torah needs v’ahavta, as Hillel said to the Geir. Torah is m’chayeiv achrayus, and the more אחריות for נעלבים, the more chashuv the Torah becomes. Sensitivity to the needs and pain of others shows a level of Toras Emes that has a pnimius, Torah the way an adam gadol needs to learn it.
So, there are things besides gadlus batorah that make Torah more chashuv. Here is another example. Once, Rav Chiya and Reb Chanina were arguing about a halacha (Ksuvos 103b.) "א"ל ר' חנינא לר' חייא בהדי דידי מינצת דאם חס ושלום נשתכחה תורה מישראל מהדרנא ליה מפלפולי א"ל ר' חייא אנא עבדי דלא משתכחה תורה מישראל." Rav Chanina said, "With me you argue? If the Torah were forgotten, I could reconstruct it with logic alone!" And Reb Chiya answered, "With me you argue? I saw to it that the Torah will never be forgotten," because I developed a system of schools to teach Torah to orphaned children.
What kind of answer is that? Reb Chanina said that Reb Chiya should defer to his opinion in Torah because he was the greatest ba’al machshova and lamden; and Reb Chiya answers that Reb Chanina should accept his pshat because he is a tremendous ba'al chesed and a marvelous melameid?! Well good for you, Reb Chiya. We'll honor you at the banquet. We'll come to you for brachos. But that doesn't make you a bigger lamden!
The answer is inescapable. Le’asukei shmatsa aliba de’hilchesa, to properly understand the truth of the Torah, you need siyata dishmaya. So since Reb Chiya and Reb Chanina both knew kol hatorah kullah, the determinant would not be lomdus or yedi'as Hatorah, but instead Gadlus in Torah— both chavivus of the Torah to the one who is learning it and the chavivus of the one who is learning it to the Torah. And that is what Reb Chiya’s answer was. This is an aspect of gadlus batorah that goes beyond yedios and lomdus.
1. The first midda of Rachamim (see Rosh in first perek of Rosh Hashanna) is Keil. When Moshe Rabbeinu davened for Miriam with קל נא רפא נא לה, Hashem told him ואביה ירק ירק בפניה וגו. The Gemara in BK says ק"ו לשכינה ארבעה עשר יום. So you see that the midda of Keil is associated with the din of Kal Vachomer. (Bnei Yissaschar)
2. The relation of Keil/Rachamim to Kal Vachomer is the reason that אין עונשין מן הדין. (from Reb Yosef Engel in his Beis Ha'Otzer I siman 56:16.)
3. The thirteenth midda is Nakei/Lo Yenakei. The corresponding Midda is Shnei kesuvim haba'im ke'echad. That's why the Gemara in Yoma says דתניא רבי אלעזר אומר אי אפשר לומר נקה שכבר נאמר לא ינקה ואי אפשר לומר לא ינקה שכבר נאמר נקה הא כיצד מנקה הוא לשבין ואינו מנקה לשאינן שבין. (Bnei Yisaschar)
This idea is also congruent with and even implicit in the Nefesh HaChaim in many places.
So we see a wonderful thing. When the Gemara in Yevamos uses the passuk in Mishlei דרכיה דרכי נעם to inform how we darshen pesukim, it's not an outlier. Rachamim and Darkei No'am are the essence of the Torah. Is it any surprise that Chesed brings to סיעתא דשמיא for אסוקי שמעתא אליבא דהילכתא?