Our Masters taught:
“There are three whose lives are not life, and these are they:
The one who looks upon his fellow’s table,
The one whose wife rules over him,
And the the one whose body is ruled by his ailments.”
And there are those who say: “Even one who only has one garment.”

The people in these instances, according to the beraita, are in such a sad situation, it is as if they are not really fully living. One aspect – of many(!) – of this text is the first line about the one who looks upon one’s fellow’s table, since there is a parallel in the earlier Wisdom of Ben Sira (40:29):

When one has to look to a stranger’s table,
one’s life is not to be considered a life.
The delicacies offered bring revulsion to one’s spirit,
and to the intelligent inward torture.1

Although the extant Hebrew manuscripts’ version is not exactly the same, they still retain the same feeling:

One of the interesting elements of these parallel texts is not only the similarity, but also the reason supplied by Ben Sira, that it is revulsive and torturous to have to look at someone else’s table because one is so hungry, which is enhanced by the preceding verse (Ben Sira 40:28):

My son, live not the life of a beggar;
better to die than to beg.3

Now one thing that is unclear is was this rabbinic teaching either 1) drawing directly from Ben Sira (i.e. the creator of the teaching read Ben Sira), 2) drew indirectly from Ben Sira (i.e. perhaps someone else had read it and had somehow shared this idea), or 3) came up with the idea without having any knowledge of Ben Sira. It is, of course, unclear.

For what it’s worth, here is an excerpt regarding the rabbis of the Talmud and their knowledge of Ben Sira:

In contrast to the situation in Palestine, which saw the continuous presence
of Ben Sira, the Babylonian rabbis were not exposed to the work itself before the
fourth century CE. Until then, they probably knew of the work because of the tannaitic
source that mentions it or because of general familiarity with his name as an
ancient wisdom sage. In the early fourth century, the Book of Ben Sira became
available in Babylonia. R. Joseph knew the work well, perhaps having scrutinized
it to determine what its status should be in the Jewish community. He therefore
cited it accurately and ruled that it may be studied orally.

Subsequently, it became known through recitation in rabbinic circles, but as
it was neither canonical nor a standard part of the curriculum, the text was not preserved
accurately. This is perhaps because there was no long tradition of studying
or citing the Book of Ben Sira, and its newfound Babylonian Jewish students
either neglected to treat it with much care or took advantage of its obscurity.
Thus, the Babylonian citations that derive from the period after R. Joseph
(mid-fourth century to sixth century) include conflations, rephrasings, and even
aphorisms or parts of aphorisms that are not found in Ben Sira at all.4