You don't have to go to classes in college...unless you want to pass your courses, keep your scholarships or stay enrolled in your college. A REALLY long time ago, students could get away with not going to their college classes IF they had a way of getting their class notes AND their professor had made it clear that there was no penalty for not attending classes. Today, a student who does not attend classes is likely to lose his place at his university.
In the good old days when the current myth that you don't have to attend classes was born, many colleges did not require professors to take class roll in every class. Fast forwarding to today, the federal government requires colleges to keep student attendance records for financial aid purposes. Students who don't attend classes can lose their financial aid. Some colleges automatically withdraw students who are not attending classes.
Another reason that colleges like to know that you are going to classes is that the federal government keeps statistics on the percentage of students who graduate on time. There is a correlation between attendance and academic success.
An unpleasant side effect of not attending classes and being withdrawn is that the student could be in a situation where the college still charges him for the cost of the entire term at the same time that the financial aid and scholarships are pro-rated or withdrawn. That can result in the student owing the college money.