Any source? In my field US Citizens and permanent residents are actually preferred for at least two reasons, first they are eligible for graduate grants like NSF so they are not using department's money; second upon graduation they are eligible for more jobs because places like national labs do not hire foreigners.
I agree with the general sentiment of this comment, but national labs do hire foreigners/non-citizens, albeit possibly not from all countries with eligibility for all roles.