There are different types of MPH's. Some may focus on Biostatistics, some on nutrition, some on epidemiology, etc. And there are also M.S. degrees that are extremely similar.
Some have a thesis, and some do not.
Depending on which type of program you do, it may or may not be available to people who are not already a health professional, and it may or may not make more sense to do it after you have your professional degree.
I want to do clinical research, and I might do an MPH or MS, but I don't want to do it until after I have done my M.D., because I want to make sure that if I do a thesis-based program, I do my research in a relevant field. It just seemed silly to me to do a masters degree and do a whole bunch of work regarding juvenile diabetes and then turn around and specialize in inflammatory bowel disease or oncology. Of course there will be overlap, regardless, but it would be great to start off your career with relevant work.
On the other hand, if you're not doing the thesis based programs, and you just want a general overview of how to do biostats or epidemiology, or the basis for nutrition...and especially if you want to boost your GPA before applying to MD/DDS/NP programs, then it could be better to do the masters first.
Hope that sort of helped clarify why you would do it in whichever order.