The Talmud discusses when a Jew may benefit from a ladder or other object that a non-Jew used on Shabbat for his own needs. This sugya establishes the principle that if the non-Jew acted for himself, the Jew may benefit — foundational to analyzing the bellhop scenario.
מַתְנִי׳ גּוֹי שֶׁהִדְלִיק אֶת הַנֵּר — מִשְׁתַּמֵּשׁ לְאוֹרוֹ יִשְׂרָאֵל. וְאִם בִּשְׁבִיל יִשְׂרָאֵל — אָסוּר. מִילֵּא מַיִם לְהַשְׁקוֹת בְּהֶמְתּוֹ — מַשְׁקֶה אַחֲרָיו יִשְׂרָאֵל, וְאִם בִּשְׁבִיל יִשְׂרָאֵל — אָסוּר. עָשָׂה גּוֹי כֶּבֶשׁ לֵירֵד בּוֹ — יוֹרֵד אַחֲרָיו יִשְׂרָאֵל, וְאִם בִּשְׁבִיל יִשְׂרָאֵל — אָסוּר. מַעֲשֶׂה בְּרַבָּן גַּמְלִיאֵל וּזְקֵנִים שֶׁהָיוּ בָּאִין בִּסְפִינָה וְעָשָׂה גּוֹי כֶּבֶשׁ לֵירֵד בּוֹ, וְיָרְדוּ בּוֹ רַבָּן גַּמְלִיאֵל וּזְקֵנִים. גְּמָ׳ וּצְרִיכָא, דְּאִי אַשְׁמְעִינַן נֵר, מִשּׁוּם דְּנֵר לְאֶחָד נֵר לְמֵאָה, אֲבָל מַיִם לִיגְזַר, דִּילְמָא אָתֵי לְאַפּוֹשֵׁי בִּשְׁבִיל יִשְׂרָאֵל. וְכֶבֶשׁ לְמָה לִי? מַעֲשֶׂה דְּרַבָּן גַּמְלִיאֵל וּזְקֵנִים קָא מַשְׁמַע לַן.
MISHNA: If a gentile kindled a lamp on Shabbat for his own purposes, a Jew also uses its light; and if the gentile kindled it for a Jew, the Sages prohibited to utilize its light. Similarly, if a gentile drew water from a well in the public domain to give his animal to drink, a Jew gives his own animal to drink after him from the same water; and if he drew the water initially for the benefit of a Jew, it is prohibited for a Jew to give his animal to drink from that water. Similarly, if a gentile made a ramp on Shabbat to disembark from a ship, a Jew disembarks after him; and if he made the ramp for a Jew, it is prohibited. There was an incident in which Rabban Gamliel and the Elders were traveling on a ship and a gentile made a ramp on Shabbat in order to disembark from the ship on it; and Rabban Gamliel and the Elders disembarked on it as well. GEMARA: The Gemara comments: And it was necessary to teach this halakha in all these cases. As, had it taught us only the halakha with regard to a lamp, I would have said that this is the halakha because the light of a lamp for one is the light of a lamp for one hundred people. There is no need to kindle multiple lamps for multiple people; the light of one candle suffices for many. Therefore, it is permitted to use the light of a lamp kindled by a gentile. However, with regard to water, there is room to issue a decree against benefitting from the gentile’s efforts, lest one come to increase the amount of water he draws for a Jew, even without stating that intention. The Gemara asks: And why do I need the mishna to mention that it is permitted to use the ramp? The Gemara answers: It taught us the case of the ramp to cite the incident involving Rabban Gamliel and the Elders to indicate that they followed this ruling in practice.