Why Tikkun Olam?

(ג) אין אלמנה נפרעת מנכסי יתומים אלא בשבועה. נמנעו מלהשביעה, התקין רבן גמליאל הזקן שתהא נודרת ליתומים כל מה שירצו, וגובה כתבתה. העדים חותמים על הגט, מפני תקון העולם. הלל התקין פרוזבול מפני תקון העולם.

(3) A widow may only collect [the debt owed from her ketubah, monetary settlement payable to a married woman upon divorce or the death of her husband] from the property of orphans by [taking] an oath. They stopped imposing an oath; Rabban Gamliel the Elder enacted that she may make a vow with regard to whatever they desire, and collects her ketubah. Witnesses sign on a bill of divorce, due to Tikkun HaOlam. Hillel instituted the prosbul [a court-issued exemption from the Sabbatical year cancellation of a personal loan] due to Tikkun HaOlam.

(ט) המוכר את עצמו ואת בניו לגוי אין פודין אותו, אבל פודין את הבנים לאחר מיתת אביהן. המוכר שדהו לגוי וחזר ולקחה ממנו (ישראל), הלוקח מביא ממנו בכורים, מפני תקון העולם.

(9) [With regard to] one who sells himself and his children to a non-Jew, we do not redeem him. But we redeem the children after the death of their father. [With regard to] one who sells his field to a non-Jew, and a Jew buys it back from him, the buyer brings the first fruits from it, due to Tikkun HaOlam.

(ז) מפרנסין ומכסין עניי עכו"ם עם עניי ישראל מפני דרכי שלום ועני המחזר על הפתחים אין נזקקין לו למתנה מרובה אבל נותנין לו מתנה מועטת ואסור להחזיר את העני ששאל ריקם ואפילו אתה נותן לו גרוגרת אחת שנאמר אל ישוב דך נכלם.

We provide sustenance and clothing for the poor of the gentiles together with the poor of the Jewish people as an expression of the ways of peace.

When a poor person begs from door to door, we do not give him a large gift. Instead, we give him a small gift. It is forbidden to turn away a poor person who asks [for charity] empty-handed. Even giving him one fig [is sufficient], as [Psalms 74:21]: "Let not the dejected turn away in shame."

...

ת"ר מפרנסים עניי נכרים עם עניי ישראל ומבקרין חולי נכרים עם חולי ישראל וקוברין מתי נכרים עם מתי ישראל מפני דרכי שלום:

Our rabbis taught: We provide for the gentiles' poor with Israel's poor, we visit gentiles' sick with Israel's sick, and we bury the gentiles' dead with Israel's dead, due to the ways of peace.

א. כי צריך כל אדם לומר: כל העולם לא נברא אלא בשבילי (סנהדרין לז א). נמצא כשהעולם נברא בשבילי, צריך אני לראות ולעין בכל עת בתקון העולם. ולמלאות חסרון העולם, ולהתפלל בעבורם.

Likutei Moharan 5:2

Since each man must say, "The whole world was only created for me." (Sanhedrin 37) --hence, insofar as the world was created for me, I must at all times see and look into tikkun olam/rectifying the world and to fill the lackings of the world and pray for them.

ל"ל למיתנא דיינים ל"ל למיתנא עדים הא קמ"ל דלא שנא כתוב בלשון דיינים וחתמי עדים ולא שנא כתוב בלשון עדים וחתמי דיינים: מפני תיקון העולם: מאי מפני תיקון העולם ר' יוחנן אמר מפני תקנת ממזרים ריש לקיש אמר מפני תקנת עגונות ר' יוחנן אמר מפני תקנת ממזרים סבר לה כרב נחמן דאמר בפני שנים ובי תרי לית להו קלא והיא לא שמעה ולא ידעה ואזלה ומינסבא ואיכא ממזרים וריש לקיש אמר מפני תקנת עגונות סבר לה כרב ששת דאמר בפני ג' ובי תלתא אית להו קלא ושמעה וידעה ולא מינסבא ותקנת עגונות הוא דאיכא
The Gemara asks with regard to the mishna in Shevi’it: Why do I need the tanna to teach that it can be signed by judges, and why do I need him to teach that it can be signed by witnesses as well? Why is it necessary to mention both? The Gemara answers: This teaches us that there is no difference if the prosbol is written in the terminology of judges and witnesses sign it, and there is no difference if it is written in the terminology of witnesses and judges sign it. What is important is that the prosbol was written and then signed by the court, and the precise wording is not important. § The mishna taught that Rabban Gamliel the Elder instituted that one may not render a bill of divorce void in a court elsewhere for the betterment of the world. The Gemara asks: What problem did Rabban Gamliel ameliorate that this is considered to be for the betterment of the world? Rabbi Yoḥanan says: This is for the benefit of potential children born from an adulterous relationship [mamzerim], as the husband might render a bill of divorce void unbeknownst to his wife. She might remarry after having received the void bill of divorce, when in fact she is still married to her first husband, and children born from the second marriage will be mamzerim. To prevent this, Rabban Gamliel instituted that one may not render the bill of divorce void when not in the location of his wife. Reish Lakish says: For the betterment of deserted wives, lest women who received their bill of divorce by means of the husband’s agent refrain from remarrying out of the concern that perhaps their husband rendered the bill of divorce void. The Gemara explains the two opinions: Rabbi Yoḥanan, who says the reason for this ordinance is for the betterment of potential mamzerim, holds in accordance with the opinion of Rav Naḥman, who says that the husband can render void the bill of divorce even in the presence of two people. And since matters that occur in the presence of two people do not generate publicity, it is possible that she does not hear that the bill of divorce was rendered void. And since she does not know that her husband rendered the bill of divorce void, she will go and marry, and there are mamzerim as a result of second marriages like these. And Reish Lakish, who says that the reason is for the betterment of deserted wives, holds in accordance with the opinion of Rav Sheshet, who says: One can render void a bill of divorce only in the presence of three people. And since matters that occur in the presence of three people do generate publicity, she does hear and know that her husband rendered void the bill of divorce, and she would not marry again. Therefore, there is no concern that this will result in mamzerim, but there is a need to institute this ordinance for the betterment of deserted wives, as explained above.