Looks like total cost of attendance is much higher than $9k/year: https://admissions.unc.edu/afford/cost-of-attendance/
Even if you only paid tuition, you'd still have housing expenses, since most students don't live at home for a school like UNC. So overall I think it's disingenuous to say it's only $9k/year.
Accommodation, transport, food etc. all need to be paid whether you’re attending school or not. If you’re trying to include all real costs foregone earnings are by far the biggest.