They do this partially for financial reasons. Out of state, or out of country students pay a LOT more for tuition.
Doing some back of the envelope math, our local university is bringing in an additional ~$180M for 12K foreign students. They pay $15K or more depending on the degree.