I’d like to see a cite on that as the 14th Amendment “privileges and immunities” clause says just the opposite:
They could have decided that it’s constitutional on the basis that state residents have to pay taxes to help support the state-supported college or university which the non-resident doesn’t. This would not apply to private colleges, but private colleges don’t charge different rates.