Adaptive immunity is one of the miracles of the human body in my opinion. When the body fights an antigen for the first time, the genetic makeup of cells literally change. So when a white blood cell comes across that antigen again, it recognizes it and attacks! It's just amazing.
If it wasn't for this system, humans couldn't have survived the types of epidemics that have occurred throughout history. Humanity would have probably ended.