Vayikra18:5

וּשְׁמַרְתֶּם אֶת־חֻקֹּתַי וְאֶת־מִשְׁפָּטַי אֲשֶׁר יַעֲשֶׂה אֹתָם הָאָדָם וָחַי בָּהֶם אֲנִי יְהוָה׃

You shall keep My statutes and My judgements, which a person shall do and live by them. I am the Eternal.

Vayikra 18:5

וּשְׁמַרְתֶּם אֶת־חֻקֹּתַי וְאֶת־מִשְׁפָּטַי

Vayikra / Leviticus 18:5 · Drash

Vayikra 18:5

וּשְׁמַרְתֶּם אֶת־חֻקֹּתַי וְאֶת־מִשְׁפָּטַי אֲשֶׁר יַעֲשֶׂה אֹתָם הָאָדָם וָחַי בָּהֶם אֲנִי יְהוָה׃

You shall keep My statutes and My judgements, which a person shall do and live by them. I am the Eternal.

Drash דְּרָשׁ

To live, not to die

What matters more: keeping a rule or saving a person?

The Tosefta: Rabbi Acha in the name of Rabbi Akiva: if to save a life even in doubt one may kill a thief, then all the more so to save a life in doubt one may break Shabbat. The commandments were given to live by them, "and not to die by them", and nothing stands before saving a life except three bans. Midrash Lekach Tov: "I am the Eternal" means He is faithful to pay the reward. "My judgements" are the commandments the nations object to, such as the ban on sha'atnez and pork.

How Tosefta, Shabbat and Midrash Lekach Tov explain it

Tosefta, Shabbat Which a person shall do and live by them

Rabbi Acha said in the name of Rabbi Akiva: it says: "If a thief is found breaking in" (Shemot / Exodus 22:1). And the master of the house: is it certain that the thief will kill him, or is it in doubt? Say: in doubt. If one may kill a person to save a life in doubt, then by law one breaks Shabbat too to save a life in doubt. For the commandments were given to Israel only to live by them, as it is said: "which a person shall do and live by them". "And live by them", and not die by them. Nothing stands before saving a life except the worship of other gods, forbidden intimacy and the shedding of blood. When is this said? Not in a time of persecution. But in a time of persecution a person gives his life even for the lightest commandment, as it is said: "And you shall not profane My holy Name" (Vayikra / Leviticus 22:32). And it says: "The Eternal made everything for His own sake" (Mishlei / Proverbs 16:4).

Midrash Lekach Tov You shall keep My statutes and My judgements

To give both keeping and doing to the statutes, and both keeping and doing to the judgements. "And live by them": in the world to come. "I am the Eternal": faithful to pay the reward. Another explanation: "you shall keep My statutes": these are the commandments that reason understands. "And My judgements": those the star-worshipping nations object to, such as wearing sha'atnez and mixtures (כִּלְאַיִם) and eating pork.

Takeaway

From here the rule: to save a life one breaks almost any commandment. This is called pikuach nefesh (פִּקּוּחַ נֶפֶשׁ), "saving a soul" (Yoma 85b).
Sha'atnez (שַׁעַטְנֵז) is cloth of wool and linen together: the Torah forbids wearing it (Devarim / Deuteronomy 22:11).
In Rashi "statutes" and "judgements" are the other way round: what reason understands is the judgements.