There is a cost-benefit relationship in every case,
but if you have serious infection that may harm yourself and baby, then the small risk the antibiotics may bring is nothing. OBs usually do a pretty job in prescribing medication to pregnant women.