Your immune system is faster to respond to pathogens similar to those that have infected you previously than it is to respond to completely novel pathogens, because it holds a memory of past infections. I have read many descriptions of this process and they always read like magic to me. I don’t know if I’m dense for not getting it, or if I correctly recognize the explanations as oversimplified. Immunizations are designed to give your immune system that memory without the negative effects of an actual infection. The common ways to do this are to kill the pathogen before it’s injected, or to use a weakened form of the pathogen that can reproduce but has fewer side effects.
The magic that allows the immune system to recognize pathogens is generally based on recognizing surface proteins. If a pathogen’s surface proteins change too much, the past immunity is useless. This is why it is so hard to fight HIV: it mutates so rapidly that the immune system can’t keep up. It is also why flu immunity (natural or induced) rarely carries over from year to year: the virus’s surface proteins vary too much.
Variability can come from many sources. One is a spontaneous mutation within a viral particle. Another is when two similar viruses co-infect the same cell and exchange genetic material. All viruses follow the same very basic pattern: they infect a cell with their own genetic material (either DNA or RNA), hijack the cellular machinery to copy that genetic material and to produce the proteins those genes encode for, and package up the DNA or RNA in those proteins into a new viral particle and escape the cell. While the DNA/RNA is floating around, it may cross over. In order to exchange alleles, two strands have to line up at equivalent points to cross over (e.g. the same position on the same gene). If the DNA/RNA is circular, they must cross over twice, at equivalent positions, or the DNA/RNA strand is nonviable. This is statistically very rare, but a single host cell can produce millions of new viral particles, so it still happens enough to be a concern.
The flu is special. Most viruses have one long strand of DNA or RNA, which may be linear or circular. Influenza has 8 strands, each of which carry one gene. They are not actually chromosomes, but for our purposes they’re pretty equivalent. When a flu particle is manufactured, the assembly machinery grabs 8 strands and packages them up. If memory serves, the grab is random, but that gives only a (1/8)^8 chance of given viral package being viable, so I suspect I am wrong.
Either way, when a cell is co-infected by two different strains of flu, the viral assemblers will naturally mix and match from all available strains. This makes it much easier to exchange genes between different flu strains.
Tomorrow: it gets worse.