Our Gemara on Amud Aleph discusses an interesting intersection between the letter of the law and ethical obligations beyond legal requirements:
If one finds his lost item and his father’s lost item, tending to his own lost item takes precedence.
The Gemara provides a scriptural source that alludes to the need to ensure one doesn’t save others’ possessions to the extent that he himself becomes impoverished.
Only so that there shall be no needy among you” (Deuteronomy 15:4). This verse can be understood as a command, indicating that it is incumbent upon each individual to ensure that he will not become needy. Therefore, your property takes precedence over the property of any other person.
Nevertheless, the Gemara warns:
Although that is the halakha, anyone who
rigidly follows this principle with regard to his property at the expense of others’ property ultimately comes to experience that fate.
Rashi explains:
If one is constantly following the technical rules, he would end up never doing chessed, as he will always prioritize his loss or gain. He should rank his need first only in a situation of a concrete, evident loss, not a vague loss, nor a vague possibility of loss.
Shulchan Aruch codifies it in accordance with Rashi’s definitions (CM, 264:1), that one should not resort to the legal standard of putting his own financial needs over saving others’ objects, unless there is a clear and evident resulting loss.
Shalah (Vavei HaAmudim 15) explains that this implies that one should risk possible financial loss to save another from imminent financial loss. He goes further to say that this also applies to life and death matters. One should incur moderate risk to save the life of another who is in immediate danger, such as saving a drowning person (Beis Yosef, CM:426)
Even though the Gemara (Yoma 83a) states:
In all cases of uncertainty concerning a life-threatening situation, the halacha is lenient.
Apparently this rule of preserving your life, taking precedence does not apply when another person’s life is in immediate danger. In such a case, the danger of another’s certain death requires a person to put himself at moderate risk
This principle has been applied to financial and health matters. Presumably, the same argument can be made regarding spiritual matters. One might be required to risk their own spiritual safety in order to save others from certain sins, such as moving one’s family to an area that has few religious Jews for the sake of kiruv, so long as the risk isn’t unreasonable.
The Torah was deliberately not legalistic about requirements for kindness, since by its very nature, it represents an impulse to voluntarily do something extra. Even though there are many halachos that seem to mandate kindness, there also are many areas left to human judgment, compassion and situational dynamics. Kindness cannot be held or contained in rules because it is about beyond the rules. To not steal from someone is a rule, but to be generous is a kindness. The laws in the Torah about kindness can be seen as road signs, in that they point you in a certain direction, but they still leave the driving to you.