We all wanted to see The Last of Us Episode 9 on HBO. Because there are endings that leave an indelible mark on our hearts, and all those who experienced it through the video game back in 2013 have been debating the outcome for a long time. We could sense what was going to happen, but we did not have a surprise that has put an end to one of the greatest mysteries in its history: the scientific explanation for Ellie’s immunity and why she is not affected by the fungus despite having been bitten by an infected person.

Enlarge
Why is Ellie immune?
- Note: below are included spoilers from episode 9 of The Last of Us
Episode 9 has allowed us to discover it thanks to two moments. The first is the incursion of Anna, Ellie’s mother. A character who had hardly been mentioned in a superficial way until now, and who we have seen in one of the most revealing scenes of The Last of Us series: Ellie’s birth in the abandoned farm, while Anna herself was attacked – and bitten – by an infected while giving birth to the calf.
The infected bit Anna when Ellie was still linked to her by the umbilical cord., before she actually cut him with the razor, which, by the way, is the only memory Ellie has of her mother. This coincidence resulted in the baby somehow being reached by Cordyceps, although far from causing fatal effects, she gave him the gift of immunity.
At another point in the episode, Marlene offers Joel an explanation from a medical point of view: the exposure to the fungus was very low for the small, despite the fact that his mother could not escape a fatal outcome. Said residual exposure gave Ellie the ability to generate a “chemical messenger” (a substance that allows cells to communicate with each other, generating a response in the recipient) able to trick Cordyceps into thinking it is already infected.
As you know, the infected are connected as if it were a hive mind (remember the moment when one of the many who walked in the horde approached Tess, recognized her as one of his own and decided not to attack her) . In the case of Ellie, it is not exactly like that, since some infected have tried to attack her, but had he bitten her once or a thousand times, in no time would she have transformed.
Source | The Last of Us on HBO