I think the key difference in this case is that Ellie was more or less the only tangible chance the world had at that point. So the rational choice would always be to sacrifice her, especially when considering how many people have died and keep dieing (there is a tape recorder at the university in SLC that states 60% of the worlds population had been infected).
However, and this is where the writing is so compelling – noone wants Ellie dead. If I was in Joels position I would have done the exact same thing. When we are talking about the value of a human life we, as humans, are rarely rational. But it is hard to argue for Joels action in terms of applied ethics, which demands a much colder approach.
I think this thread illustrates this so well. We all like Joel and most, if not all, agree with his actions. We understand why he did as he did. But I haven't found one single argument that has convinced me that his actions we're moral or rational at all. All arguments that have been made to support his choices feels more like rationalizing his behaviour.
For example, if we consider the argument that has been made about the low probability of being able to create a vaccine – it really has no relevance. Putting aside the fact that the game never discusses this at any length, even if there was 0.00001% chance of creating a cure it is still 100% better than no chance at all (which is the outcome of saving Ellie). So again, from a completely rational and ethical standpoint, what Joel did was wrong. But still, we agree with his choices.
That is brilliant writing in my opinion.