If only it was that simple.
Infection doesn’t guarantee future immunity, our immune systems are not 100% efficient. Your body can fight off an infection quite well without ever developing neutralising antibodies or any long-term immunity response involving B or T cells.
Some interesting...