The Last Of Us Explained: What Does The Ending Really Mean?
2. Is It OK To Lie If It's For A Good Cause?
"Blue lies" is how scientists call lying in the name of a greater, collective good. These are not selfish lies, used to get ourselves ahead in life, but lies that benefit others, make their lives better, or at least more bearable.
This is what Joel does twice at the end of the game, when he reveals, and then confirms, that there are dozens of people like Ellie, immune to the disease. That's how he convinces her that her sacrifice is no longer necessary.
Instead of allowing the girl to die - which, as Marlene believes, is what Ellie would actually want - Joel decided to save her. In a sense the lie may also serve as justification of his actions to himself. He tries to convince himself that he did the right thing.
While this is debatable, it's important that Ellie never finds out the truth, because she wouldn't be able to live with herself. That's the reason it was not only OK, but actually expected from Joel to lie - otherwise the rescue mission wouldn't benefit anyone.