To Perceive Is To Suffer - Aristotle

The Gemara discusses the directive to support the Ger Toshav by providing him with meat that was rendered Unkosher. A Ger Toshav is a non-Jewish person who accepts upon himself to abide by the Seven Noachide Laws. 

As it was taught in a baraita: “You shall not eat of any unslaughtered animal; you may give it to the resident alien who is within your gates, that he may eat it; or you may sell it to a foreigner;

דְּתַנְיָא: ״לֹא תֹאכְלוּ כׇּל נְבֵלָה לַגֵּר אֲשֶׁר בִּשְׁעָרֶיךָ תִּתְּנֶנָּה וַאֲכָלָהּ אוֹ מָכֹר לְנׇכְרִי וְגוֹ׳״,

Relating to the Ger, the Gemara Bava Metzia (59b), mentions there are 36, and some say 46 places in the Torah that warn about causing distress to a Ger. The Rishonim (Tosafos, Shita Mekubetzes) try to figure out how the Gemara comes to the number 36, let alone 46. Although this Gemara earlier was discussing a Ger Tzedek, that is a convert to Judaism, this section may not only be talking about a convert. If so, I would like to suggest that one source for this large number are also verses referring to a Ger Toshav such as the one in our Gemara. This is logical because the theme is related; that is, showing kindness to the socially or financially disadvantaged, in that sense even if the scope of requirements might change from Jewish person to non-Jewish person, the concept is similar. 

In this theme of showing compassion for the various kinds of strangers, we also see the importance of empathy. In one verse (Exodus 3:9), it is said directly:

You shall not oppress a stranger, for you know the feelings of the stranger, having yourselves been strangers in the land of Egypt.

וְגֵ֖ר לֹ֣א תִלְחָ֑ץ וְאַתֶּ֗ם יְדַעְתֶּם֙ אֶת־נֶ֣פֶשׁ הַגֵּ֔ר כִּֽי־גֵרִ֥ים הֱיִיתֶ֖ם בְּאֶ֥רֶץ מִצְרָֽיִם׃