herpes again

ok so like i noticed that i usually get herpes after shaving my pubes does this happen to anyone else or is it like a coincidence & is there anything i can do to prevent this?