The reasons for this treatment are increasingly less common, as all pregnant women are now tested and treated for STIs. And if you know you are not at risk, the antibiotics are unnecessary. You can opt out of this treatment in many states—easier in some than others—and this may be an option for you.