Some states have always had cheaper and better higher level education than others, for reasons often difficult to determine. NC, for example, has very good public universities, but poor secondary education. MD, on the other hand, has very good secondary schools, but their colleges are expensive compared to NC. I have always thought that NC benefited by attracting highly capable out of state students who usually ultimately lived in NC, benefiting NC, not their original home states.
I was born in NC and educated in NC colleges, for the record, and moved to MD. So I think discouraging out of state students is a short sighted mistake