Herpes has evolved alongside Homo sapiens for millions of years. It's extremely impressively adapted to the human immune system. In fact it can even boost the immune system (maybe in its evolutionary history it found that amping its hosts immune system helped it have less competitors?). In mice it can provide resistance to the bubonic plague