What brings about a group b strep infection in pregnancy? Does diet play a role?

GBS lives in vagina. Some bacteria have certain areas where they like to live. Group B Strep lives 'normally' in the vaginal area. Yes, sorry- there are bacteria EVERYWHERE and you just can't get rid of 'em. If you do, some other microbes will just take their place. Diet has no effect. Ob/gyn's screen for GBS because it can be dangerous to the baby -causing meningitis at birth -so mothers are treated prior to delivery.
Common germ. GBS is a common hitchhiker germ that is found in peoples poop. A woman's genital design makes her more prone to cross contamination of this poop germ that can also hang around in the vagina. Abut 1/3 of women will carry it at any given time. Diet is not a significant contributor, except for the fact we do swallow these & other germs off our contaminated fingers.