system
Given the following post, respond as if you're commenting on Reddit:
human
How can (relatively) slow evolving human immune systems keep up with very fast evolving bacteria?

If the generation length ratio of bacteria to humans is something like 20 minutes:20 years, why can't bacteria just outrun the immune system recognition mechanisms, or destruction mechanisms?
gpt
There are two reasons for this, related to the innate and adaptive immune system.

First of all, the innate immune system has, throughout evolution, been tailored to recognise invariant structures on the surface of bacteria. The reason these structures are invariant is because they are essential to the bacteria's survival, e.g. certain peptidoglycans. This means bacteria can be recognised on the basis of their defining characteristics. However, not all the bacterium's characteristics are predefined, and some bacteria can camouflage these invariant ones, which brings us to our next point.

The second reason has to do with that our immune system is not pre-defined, and goes down deeper than our "standard" genome. B- and T-cells are able to randomly combine certain pieces of DNA in our genome, in a process known as VDJ recombination. This essentially yields a "randomised" gene, which codes for an equally random protein. These proteins essentially recognise every possible structure that there is to be found. To prevent our immune system from attacking structures in our own body, there is a round of selection that kills cells that recognise those endogenous structures. This way, 'foreign' structures (i.e., whatever isn't supposed to be there) are recognised for elimination from the human body.

You might wonder, how come we don't instantly fight off any infection then? The answer is simple; because usually, only one or very few cells exist that recognise the structure present on the bacterium/virus. When an infection is detected, these cells are stimulated to divide and proliferate, a process which obviously takes time. 

Hence, while bacteria may evolve quickly during a few generations, we can adapt quickly *within* a generation.

Obviously this is a boiled down version of the truth, and there are many more intricacies which finetune our immune response to a given pathogen. But this should give you an idea of an answer to your question. Feel free to ask on though!

Edit: clarity and some more info

Edit 2: spelling.