You're assuming people are really learning anything in those programs that they wouldn't have had in their undergrad. I've never met an American with an undergrad who is underperforming compared to their foreign MS counterparts. The MS is merely a cheaper tool to get into the country than other investment visas plus you get credentialed. I think it's also a bit of a validation tool that the person actually has studied at the same level as US counterparts. I have met some people from India who were surprised at how difficult college was when they came to the US compared to back in India.