I don't believe that it's necessary to attend every class. There are people who barely attend classes and they do just fine in school. What's important is understanding what works for you. Back when I was in college I attended all my classes, I almost never skipped a single class but some friends of mine didn't attend classes as much as I did and they still did better than me.
As long as you can read up what was taught in class the day you decide not to attend then I don't see any reason why you have to attend everyday...unless it's like my school where you have to sign attendance and if you don't have up to 75% attendance for the semester then you won't be allowed to write exams.
My advice to you would be to figure out what works for you, if you can stay home and comfortably cover your syllabus then you don't have to attend all the classes, but if you're the type of person(like me) that needs to be taught everything then please go to class bro!!!!!
This highly depends on three things:
Back when I was still on College, some of our professors have this concept wherein students are not required to attend lectures/classes provided they do well on exams. I am an Engineering Student and most of our subjects are all related to Math. If you are very good at formulas and problem solving, you could literally pass some subjects even if you never attended any lectures. Just do well on the mid-terms and finals and you will still pass.
The point is, if you know for yourself that self-teaching is more effective than listening to an experienced professor/instructor, then feel free to skip some lectures. Often times, you learn more from the internet/online rather than your professor. Just make sure to do well in mid-terms and Finals.