My father is a professor (albeit of Medicine, where salaries are actually pretty good). He easily bought a house in a great neighborhood in San Francisco. On our street, there was a retired cop and a firefighter, and a Communications Professor at SF State. A good friend of mine's father was a physics professor at SF State, and they owned a nice, spacious house in the Sunset. Another buddies parents were both public high school teachers, owned a house in the Sunset no problem(one was full time, the other part time).
My brother is now a professor (tenure track) at SF State. He decided against renting his own 1br (too expensive), so he rooms with a buddy from high school (who teaches high school math).
So these two guys in their early 30s, one of whom is a success story out of his PhD program, rent with a roommate -where their parents easily bought and supported families.
You can say "well, that's the market at work", but then you lose your right to fret about the shortage of Americans in PhD programs in the sciences.
Back when it meant you'll never be rich, but you'll be able to afford a modest house in the western half of San Francisco", I could accept the argument that it's not about the money. But nobody will sign up for 6 years of post-grad + another couple of post-doc for near financial hopelessness or banishment to tiny towns far from the coasts...
Unless, of course, it's the only way to get legal residency in the US. Evidently, the US has decided to use this reality to staff PhD level positions in science and engineering - in spite of all this talk about getting Americans interested in math and science. Everything else is just pissing in the wind, as far as I'm concerned.
My wife's currently in college here in Canada and so are many of her friends, apparently all the colleges here are tied to some university in the US offering discounts and stuff to international students.
Another reason not mentioned is the soaring cost of education in the US. Rising far faster than inflation, higher education has become unaffordable for many. Post-baccalauriate degrees are even further out of reach.
And as for domestic students, the salary difference between a bachelors and masters (at least in electrical engineering, which was my first bachelors) would never pay for the time and money needed to get the degree. When I got my BS back in the 80s, the difference between BSEE and MSEE was $5k/year salary differential. Between the money and time lost getting the degree, presuming zero cost of money, going for the masters would have paid off after about 30 years in the workforce.
People in engineering are likewise worried about where the next generation of engineers are going to come from. Students have been voting with their feet and wallets to get away from short-term professions like engineering (the half-life of an engineering career is 7 years, which isn't long enough to pay off your student loans before you have to find a different career).