Draining the Swamp

Very often, the Gemara pairs together totally unrelated topics because they have one common denominator. Recently on the daf, we had a collection of unrelated beraisos. The only reason they were listed together is that in each case Rav Yosef said to follow the opinion espoused in the beraisa.
A beraisa discusses a situation where someone’s gutter on his roof becomes clogged (Kesuvos 60a). Rain is threatening to flood his house. Nochum Ish Galya says that one may clear the gutter on Shabbos provided he complies with two conditions. The first is that he must employ a shinui, a deviation from how the gutter is usually cleared. In this scenario, he should clear the blockage with his foot. The second condition is that he should clear the blockage when no one is looking. Rav Yosef says the halacha is in accordance with Nochum Ish Galya, and so it is codified in the Shulchan Aruch.
The reason a shinui, deviation, must be employed is that clearing the gutter on Shabbos involves a biblical Shabbos prohibition of Tikun Maneh or Makeh B’Patish. The clogged gutter was not functioning. Clearing the gutter makes it operational. The upshot is that repairing a broken utensil on Shabbos involves a Torah prohibition. Chazal do not have the authority to waive a Torah prohibition even due to great loss. However, in this case, clearing the gutter on Shabbos with one’s foot, a shinui, turns the Torah prohibition into a rabbinic one. Due to the impending loss from flood, Chazal waived their rabbinic prohibition.