Shabbat 122 - One light serves a hundred people
If a gentile lit a lamp for himself on Shabbat, a Jew may use its light. However, if he lit it for the sake of a Jew, one may not use it. Why? Firstly, a Jew should not instruct a gentile to do forbidden Shabbat work. Secondly, a Jew is not allowed to benefit from Shabbat violation. In fact, even after Shabbat he should wait for as long as it would take to perform the work in question, and only then use the result.
If a gentile constructed a catwalk to disembark from a ship, a Jew may disembark after him, but if he did it for a Jew, one may not use it. It once happened that Rabban Gamliel and the other Sages were arriving on a ship Friday night, a gentile made a catwalk, and they also used it.
Why do we need two cases? In the case of the lamp you could have said, "One light serves a hundred people" and permit its use. The ruling therefore teaches that this principle is not applicable here, and the lamp is still forbidden. The case of a catwalk is given to introduce the story. But how could they disembark if, as we will soon learn, one is not permitted to walk outside two thousand steps on Shabbat, and they were beyond that limit when Shabbat started!? - They measured the distance with a calibrated telescope, and they were within it. But still, the gentile made the catwalk for them too!? - No, they were not in his view when he did it.
Art: Frans Swagers - A ferry boat disembarking its passengers