I think it made sense for his character. Throughout the game he does terrible things to save her over and over again. Killing hundreds of people to protect her and then being fine with someone ripping her brain out wouldn't make any sense. I actually felt a strong sense of urgency at the end when I was trying to make my way to her. I wasn't thinking about everyone else. I was just trying to save her. When I burst into that operating room I took all the doctors out with no hesitation. I didn't realize you only had to kill one of them until I read about it later. In real life, if it was someone I loved you can bet I would prioritize their life over a bunch of strangers too. I wouldn't let a family member of mine be used as a test subject for a vaccine that may or may not work.
Either way, to me the ending was only a small part of the game. I was completely immersed in the 16 hours before the ending so much that even if I didn't like that part I would like the game. I disagree with you about the gameplay being bad too. I liked the gameplay for the most part and I thought it was a refreshing change from what I usually play.
Edit: even if this vaccine worked it wouldn't have magically saved everyone. They would have a hard time distributing it to everyone with all the clickers and raiders between every major town. It wouldn't have stopped the clickers from killing people and the raiders from stealing, raping, and killing everyone. I think at that point the world was beyond repair whether they could keep most people from turning into clickers or not.