Disclaimer: I have one, but they paid me for it. I got it 2000-2002; a moment's thought will reveal why I thought that was a good way to spend those years.... (Spoiler: Which is better, being paid to get a grad-level degree or unemployment?)
edit: if you can get paid to get a masters, then why not. support is usually tiered so that phd students are covered and whatever is left over can go to masters students though...
1. Many of these students come from countries where getting a tourist visa is hard. Even getting a H1B is hard too: look at the lottery ticket issue.
2. UK does not permit non-EU foreigners to work after finishing studies. So, it is irrational for those who borrow money to study to UK, then find work to pay off the debts.
3. USA gives 12 months OPT EAD permit after finishing their studies. If it is STEM masters, this OPT can be extended for 17 months. So, solid 29 months afte finishing 2 years masters. Given how hard is it to win the H1 lottery, it is a good choice.
4. There is 20,000 H1 quota every year for US STEM graduates.
5. It is very hard for many of these Masters students in US to get a decent paying job in their home countries. That's why, in India, etc., F1 visa is seen as a ticket to good living abroad.
American citizens/perm residents are equally rational as foreigners above. Their reasons are:
A. You don't need a masters degree to pursue PhD in the states. This is not the case in India and in many common wealth countries: you need to have masters to pursue Ph.D.
B. There is a chance that many students want to give up on Ph.D in the middle of their studies. So, they can use whatever credits they got to get Masters degree and drop out of the Ph.D program. This is the case when one passes Ph.D quals or not.
C. Some pursue masters to broaden their interest. Imagine someone with BA in Maths is interested in psychology, but don't want to pursue Ph.D. He just want to broaden his understanding. He will go for MS in Psychology.
D. For few, it could be moving from no-name school BA to MS in Finance at an Ivy League. HYP are in differnet category of Ivies from the rest.
E. The only masters Americans show interest in are: JD, MBA, MD.
JD (Juris Doctor) and MD (Medicinae Doctor) are actually doctoral degrees.
This is different for PhD students because you are talking about a potentially much longer period of time and much less ROI. This is especially true given the oversupply of PhDs in most fields relative to the number of actual tenure-track positions. If you can't get a tenure-track position, then you are probably over-qualified for most industry jobs and wont get much more compensation that someone with a masters.
For non-US students, the return is getting into the US on a visa and getting a post graduate technical degree from a US institution, both of which are much more likely to land you a US job (and probably wont hurt your chances in academia / industry in India / China either).
Regardless, it really shows how screwed up things are that you have PhDs that have to do this in order to find work. These are STEM majors, mind you -- to any naysayers.
IMHO