Do all lives equally matter?

R. Walter Wurzberger, Ethics of Responsibility, Pg. 91

As in life boat ethics some rational system of priorities should be devised rather than resorting to random selections of patients. As painful as it may be to play God and determine who shall live as a result of our intervention and who shall die as the consequence of our nonintervention, we cannot abdicate this responsibility. Random choice can hardly qualify as a more humane method to resolve our dilemmas.

Paul Ramsey, The Patient as a Person, 1970, pg. 256

When the ultimate of life is the value at stake, and when not all lives can be saved, it can reasonably be argued that men should stand aside as far as possible from the choice of who shall live and who shall die… random selection is preferable not simply because life is a value incommensurate with all other, and so not negotiable by bartering one man’s worth against another’s. It is sustained also because we have no way of knowing how really and truly to estimate a man’s social worth.

(ו) שֹׁפֵךְ֙ דַּ֣ם הָֽאָדָ֔ם בָּֽאָדָ֖ם דָּמ֣וֹ יִשָּׁפֵ֑ךְ כִּ֚י בְּצֶ֣לֶם אֱלֹקִ֔ים עָשָׂ֖ה אֶת־הָאָדָֽם׃

Whoever sheds the blood of a person, by a person shall ones blood be shed; For in God's image God made man.

ורבי יוחנן האי וחי אחיך עמך מאי עביד ליה מבעי ליה לכדתניא שנים שהיו מהלכין בדרך וביד אחד מהן קיתון של מים אם שותין שניהם מתים ואם שותה אחד מהן מגיע לישוב דרש בן פטורא מוטב שישתו שניהם וימותו ואל יראה אחד מהם במיתתו של חבירו עד שבא ר' עקיבא ולימד וחי אחיך עמך חייך קודמים לחיי חבירך
The Gemara asks: And Rabbi Yoḥanan, what does he do with this verse: “And your brother shall live with you”? The Gemara answers: He requires the verse for that which is taught in a baraita: If two people were walking on a desolate path and there was a jug [kiton] of water in the possession of one of them, and the situation was such that if both drink from the jug, both will die, as there is not enough water, but if only one of them drinks, he will reach a settled area, there is a dispute as to the halakha. Ben Petora taught: It is preferable that both of them drink and die, and let neither one of them see the death of the other. This was the accepted opinion until Rabbi Akiva came and taught that the verse states: “And your brother shall live with you,” indicating that your life takes precedence over the life of the other.
גמ׳ ת"ר היה הוא ואביו ורבו בשבי הוא קודם לרבו ורבו קודם לאביו אמו קודמת לכולם חכם קודם למלך ישראל חכם שמת אין לנו כיוצא בו מלך ישראל שמת כל ישראל ראוים למלכות
GEMARA: Apropos precedence, the Sages taught in a baraita: If one and his father and his teacher were in captivity, his release precedes his teacher’s because one’s own life takes precedence, and his teacher’s release precedes his father’s release. His mother’s release precedes the release of all of them. A Torah scholar precedes the king of Israel, because in the case of a Sage who dies, we have no one like him, but in the case of a king of Israel who dies, all of Israel are fit for royalty.