Bacterial Vaginosis + Pregnancy

I'm 17 weeks pregnant and I got bacterial vaginosis. My OBGYN prescribed me this weird antibiotic that I have to insert into my vagina. It's so strange and the plastic applicator kind of hurt, lol. Anyways, has anyone else been treated for BV during pregnancy? Does it come back often during pregnancy? Is it harmful to the baby? What causes it? I don't have multiple sex partners. I only have sex with my fiancé/baby's father. I don't know how I got it. I clean myself very thoroughly.