There was a sci-fi story I read in high school that I always remembered called The Cold Equations by Tom Godwin. In short, it was the story about a guy who was piloting a supply ship through space, to deliver medical supplies to a mining colony on another planet. However, unbeknownst to him, a young girl, hoping to hitch a ride to the colony where her brother was located, had stowed away and was discovered after the ship had launched and was already in route. She thought the punishment for her discretion would merely be a fine, but quickly learned that the ship had only enough fuel to make it to the planet and did not account for the weight she had added to the ship.
In other words, her stowing away jeopardized the lives of herself, the pilot and the colonists depending on the medical supplies because the ship didn’t have enough fuel to haul the extra weight and would fall short of its destination and crash.
Initially, the pilot was callously instructed by his superiors to jettison the girl off the ship and continue the journey, and naturally he showed tremendous reluctance at the thought of having to kill someone; but it was a matter of kill one person to save the many people who needed the medical supplies, or jettison the medical supplies in order to save the girl.
Spoiler alert: they deliberate for so long that it doesn’t even matter; after jettisoning the medical supplies, it turns out that a little thing called physics had already come into play, and they’d been flying overweight for long enough to where the girl needed to be unloaded anyway, due to fuel constraints. The pilot is mentally murdered by having to push the button on someone’s life, the colonists on the planet do not get the medical supplies, and he is arrested and imprisoned for insubordination.
Everyone loses.