You have to be susceptible to infection. This is a big area of research right now.....why some people get sick and some people don't when expeosed to the same pathogen.
If you are stressed, acutely or chronically, levels of cortisol will directly effect your immune response. I got sick twice in my first month of nursing school
.......I was stressed out and it compromised my immune system.
Google "Stress and wound healing". It will bring up some links that should give you some ideas of where to go.
Also there is natural immunity, some even believe that a very small portion of the population is naturally immune to AIDS.
Keep in mind that immunocommpromised individuals will get ill with infections that all of us carry but generally don't get ill from.
This could be a whole research papaer itself. Good luck.