Talmud for Gittin 4:6
הַמּוֹכֵר עַבְדּוֹ לְגוֹי אוֹ לְחוּצָה לָאָרֶץ, יָצָא בֶן חוֹרִין. אֵין פּוֹדִין אֶת הַשְּׁבוּיִים יוֹתֵר עַל כְּדֵי דְמֵיהֶן, מִפְּנֵי תִקּוּן הָעוֹלָם. וְאֵין מַבְרִיחִין אֶת הַשְּׁבוּיִין, מִפְּנֵי תִקּוּן הָעוֹלָם. רַבָּן שִׁמְעוֹן בֶּן גַּמְלִיאֵל אוֹמֵר, מִפְּנֵי תַקָּנַת הַשְּׁבוּיִין. וְאֵין לוֹקְחִים סְפָרִים, תְּפִלִּין וּמְזוּזוֹת מִן הַגּוֹיִם יוֹתֵר עַל כְּדֵי דְמֵיהֶן, מִפְּנֵי תִקּוּן הָעוֹלָם:
If one sold his bondsman to a gentile or (to servitude) outside Eretz Israel, he goes out free [if he escaped from the gentile, or if beth-din penalized him to redeem him from the gentiles (as stated: "He is compelled to redeem him"), and after he redeems him, he may not keep him in servitude. The sages penalized him for having removed him from mitzvoth. Likewise, if (he sold him) outside of Eretz Yisrael, he goes out free because he sent him out of Eretz Yisrael.] Captives are not to be redeemed for more than their worth, for "the general good" [so that the gentiles not be zealous to amass captives.] And captives are not to be "smuggled out" of captivity, for "the general good" [lest the captors vent their wrath on others who fall into their hands and chain them and place their feet in stocks.] R. Shimon b. Gamliel says: For the good of the captives, [R. Shimon b. Gamliel not being apprehensive for those who might fall into captivity, but for those who are now captive with him; but if he alone were captive, he is to be smuggled out. No fear is to be entertained for other captives if they are not already with him. The halachah is in accordance with R. Shimon b. Gamliel.] (Torah) scrolls, tefillin, and mezuzoth are not to be purchased for more than their worth, for "the general good."