Valacyclovir HCL

My Dr prescribed me valacyclovir I’m not sure why! She just told me it prevent herpes. i don’t have herpes well not that I know of. However I’m having a c section scheduled could that be the reason why? Has one else been prescribed this medication before?