a) Educating foreign students and sending them back to their home countries is a great example of how to do "soft power". This is actually the explicit intent of many programs, particularly Fulbright awards, where recipients are required to return to their home countries.
b) The terms of the student visa require that visa-holders provide evidences that they have no intent to stay permanently in the country.
So we educate them at large expense and then end up living in tents when we're unemployable? Sub-optimal I say.
I'm fine with (b) as long as US taxpayers aren't footing the students' bills. Otherwise I see money wasted. If they are so worthy we'll pay their bills then we should want them to stay. The ones that leave regardless of our welcome mat can provide us with "soft power" back in their home countries.
b) The terms of the student visa require that visa-holders provide evidences that they have no intent to stay permanently in the country.