I vaguely remember reading in my criminal law textbook, years back, that murder is one of the few exceptions to the doctrine of necessity (this would have been in the context of US law), so I don’t think that it’s ever legally-permissible to intentionally kill some random person to save yourself. IIRC the rationale was that it prevents thing like terrorist groups from coercing someone to do actions for them by threatening someone else.
That being said, there are obviously points where people are forced to take actions where either one group of people is going to die or another; in ethics, the trolley problem is a well-known example. For a maybe-less-artificial problem, closing hatches in a ship where not everyone is out of a compartment to prevent the ship from going down, say. I don’t know how law applies in the situation of weighing lives; my assumption is that it doesn’t mandate inaction.
Honestly, if there were a simpler way to sell their personal data to retailers for people who want to do so, that probably would be more appealing for the users.