The Talmud is full of Musar stories in the following pattern: a Rabbi did X and G-d made him Y, therefore we all should do X so G-d will make us Y.
In many cases, G-d's reaction can be the opposite of Y with the same level of confidence, and only post-factum we realize that the reaction is Y and not not-Y.
For example, the famous story if Rabbi Yehudah Hanassi and the calf (B"M 85a):
"ע"י מעשה באו מאי היא דההוא עגלא דהוו קא ממטו ליה לשחיטה אזל תליא לרישיה בכנפיה דרבי וקא בכי אמר ליה זיל לכך נוצרת אמרי הואיל ולא קא מרחם ליתו עליה יסורין
... There was a calf that was being led to slaughter. The calf went and hung its head on the corner of Rabbi Yehuda HaNasi’s garment and was weeping. Rabbi Yehuda HaNasi said to it: Go, as you were created for this purpose. It was said in Heaven: Since he was not compassionate toward the calf, let afflictions come upon him.
Could we negate an opposite reaction from the Heaven - if they said: "Well done R' Yehudah, for you truly understand the benefit for an animal of being sacrificed in the Temple before G-d!"? I doubt, it seems as legitimate as the original outcome.
Just another example: R' Eliezer and the Sages (B"M 59b) - G-d could easily kill all the Sages for not listening to the Heavenly Voice, but He acted differently.
How can we learn from those examples where the outcome is seemingly arbitrary, as it can not be negated?
NB: a slightly different pattern is that a Rabbi does X and the Gemmorah approves/condemns it, but it follows the same reasoning: as we can't negate the outcome - we can't learn from the story.