Many illnesses are associated with an alteration of the immune system homeostasis due to any combination of factors, including exogenous bacterial insult, endogenous breakdown (e.g., development of a disease that results in immuno suppression), or an exogenous hit like surgery that simultaneously alters immune responsiveness and provides access to bacteria, or genetic disorder. We conjecture that, as a consequence of the co-evolution of the immune system of individuals with the ecology of pathogens, the homeostasis of the immune system requires the influx of pathogens. This allows the immune system to keep the ever present pathogens under control and to react and adjust fast to bursts of infections. We construct the simplest and most general system of rate equations which describes the dynamics of five compartments: healthy cells, altered cells, adaptive and innate immune cells, and pathogens. We study four regimes obtained with or without auto-immune disorder and with or without spontaneous proliferation of infected cells. Over all regimes, we find that seven different states are naturally described by the model: (i) strong healthy immune system, (ii) healthy organism with evanescent immune cells, (iii) chronic infections, (iv) strong infections, (v) cancer, (vi) critically ill state and (vii) death. The analysis of stability conditions demonstrates that these seven states depend on the balance between the robustness of the immune system and the influx of pathogens.