But they are also very beneficial during your studies. Learning alone means you never have the chance to ask for help, give help and discuss what you learned.
Universities also do research you can be part of. I helped build a CubeSat during my uni time and was part of a sounding rocket mission. You can't do that in a YouTube video of a lecture and you can't to that as a side project.
University is a place to meet like minded people and learn about stuff you are interested in. You get teachers and facilities you wouldn't normally have access to. Use it!
And make sure that you go to uni with this mental model of it. Whenever you see uni doing things that don't fit in that model, try to change it. Unis aren't there to make sure you get a better job, get access to hidden networks in society, take loads of money from students, crank out degrees, ...
They are there to enable people growing personally and fuel that growth back into growing humanities knowledge.
... and yeah, some local hackerspaces are closer to that idea of an University that many Universities are. That's a problem.
Plenty of sites and forums to ask for help, give help and discuss what you learned.
I went to a top tier school and struggled with various parts of the curriculum (CHEM52, I'm looking at you). I convinced myself that I wasn't smart/good enough for various futures I'd previously envisioned, like academia or research. My confidence was shot and it affected where I applied for jobs out of college.
I ended up taking a contract position at Microsoft. I thrived, got my confidence back, and got hired full-time.
Two years after graduation an acquitance from my college reached out to me- he was coming to Microsoft Research for the summer, could I help him find a place to rent? We reconnected and got talking- It turned out his undergrad GPA was lower then mine! I never did find why he was more confident than me, but he had no problem thinking he was still qualified for a PhD program and was clearly doing well enough there to get picked up by prestigious research lab.
I'm pretty happy with the way my life has turned out, I have no reason to go back and change any decisions. In fact, many of the most valuable experience I had were unrelated to the classroom- student government, interactions with the board of trustees, putting together funding for various small projects. And I've had a great career since college. The only thing I wish I could change was how I felt about myself- I wish I'd been able to tell 20-year old me "you are doing fine! It'll be awesome in the end!" and have 20-year me believe me.
All of the above is a long way of saying- don't worry too much about your grades. Don't blow them off, but in the end they aren't as important as we often make them out to be.
But these were the most challenging courses at a top 5 CS school, with some of the brightest researchers alive teaching course material. At another school that calculus is probably closer to what you're saying.
After 2 years in the field no one gives a damn. The degree is basically just a box for HR to check off.