Also keep in mind that this is very field-dependent as well as program dependent. There are no hard-and-fast rules.
In a lot of fields in the natural sciences, an M.S. is the standard working degree, and so in many fields people traditionally do a stand-alone M.S. regardless of whether they plan on going on to a PhD.
As an example, in geoscience, M.S. degrees are one of two types:
- Those handed out automatically en route to a PhD (usually after passing quals/prelims).
- Those that consist of a stand-alone project/degree.
The big difference with other fields is that the stand-alone, industry-oriented M.S. is the one that requires a thesis. The other is rather meaningless unless you get a PhD from the same program as well.
Both are common precursors to a PhD (it's very common in geoscience to do an M.S. on a fairly different project than your PhD). However, the first type isn't seen as its own degree, and is often looked down upon (e.g. "he/she dropped out with an M.S." vs. "he/she got their M.S. at XYZ").