Learn why pregnant people who are diagnosed with preeclampsia or go into preterm labor may be treated with magnesium sulfate.