@1sxt How many jobs outside of highly specialized research truly require a PhD? The answer is very few.
For those few jobs, there is more than enough domestic intellectual talent to source and/or funnel into (very expensive) graduate research programs. You also forgot to mention that most foreign-born graduate students studying in the US come from very well-off families, making this particular use of soft-power a form of class selection.
This stratification via soft power comes at the expense of American students, who, making up the majority of undergraduates, bear the brunt of the tuition costs. Foreign graduate students are often receiving generous (federally funded) grants, again, at the expense of American students.
And yes, after five or more years of professional practice, there is very little distinction between holders of a B.S., M.S., or a PhD in most STEM disciplines, unless someone is working in String Theory or some other esoteric branch of theoretical science.