Zofran

If Zofran is dangerous for pregnant women's to take why are doctors still prescribing it?