Most STEM PhDs (and especially in the hard sciences) are funded from mostly government sources. It’s seen as the country making an investment in top talent.
Nobody (who is any good) in the USA pays money for a STEM PhD. You get paid to do these degrees, albeit not a lot but a lot better than paying yourself!
You do get paid but quite little. I still took on debt during my physics PhD for lifestyle reasons (my significant other was 2k miles away, so flights were prioritized over savings).
I went to graduate school early 2000s. 6 years, average stipend < $15k and still had to pay student fees. Then a couple post docs for 5 more years at $40k.
There was significant opportunity cost, but now I've had 3 jobs that were all reasonably well paid that I only got because of the fanciness of my degree. I'm _not_ saying that's the right sorting for hiring managers to do, but it is what happened to me.
Net-net, I don't know if I'm even, behind, or ahead financially. I do know that graduate school was one of the best experiences of my life, my deepest friendships were formed in those years, and I miss pursuing my passion at that level constantly. So, I guess I'm in the position of not really caring if it lost me money.
Right I know, but I was making the assumption that they had a related undergrad, and more importantly, accounting for opportunity cost. Five years of working time for someone smart and quantitative enough to do a physics PhD is easily over six figures.
Nobody (who is any good) in the USA pays money for a STEM PhD. You get paid to do these degrees, albeit not a lot but a lot better than paying yourself!