I think Marlene left Joel no choice but to kill everyone. Marlene just assumed Ellie would want them to cut her brain out. That is a huge assumption. How about ask her. Marlene saying she thinks Ellie would want to do what's right? Why is it right? It's right in Marlene eyes. Ellie didn't think she was gonna die. She said after she would follow him anywhere. Why in the world is the first thing they want to do is cut this kids brain out? No testing her blood first of anything? Marlene had no intention of finding out if Ellie would have a problem with any of this. The hospital was barley functional. They didn't even know if they had enough power to finish the surgery. So they have no idea if it would even work at all as a cure. What will they actually do with the vaccine if it works. Would they really give it to everyone? And how will they mass produce it. No way in the world a hour after getting to the hospital. And not telling her are they cutting her brain out.
This is why I not watching the show into season 2 because what is the point? There was an opportunity here with the doctor to find a cure to cure all of humanity and Joel just shot down those chances and for what? Pointless. Not going to watch a series where the entire premise is an exercise in futility.
Try to understand where Joel's coming from. He already lost a daughter and wasn't about to lose another. I thought it was extremely sympathetic. Besides, the chance of a working cure was not 100%