There is no such thing as a useless degree. The experience of college is by far more important than the degree you get because of it. So in the pursuit of any degree, you will gain something valuable. However, that degree symbolizes that experience and recognizes that you have put in some work and dedication. Theoretically anyways lol.
Being around driven, goal oriented, intelligent(somewhat )people who are pursuing interests both in line with and outside your own preferences is an invaluable experience. It is a sounding board for the directions you are thinking of taking. The social element is also quite valuable. Learning to navigate multiple different social circles and dealing with and conquering the pitfalls therein prepares you for developing worthwhile and valuable connections later on.
People think of education as this predetermined thing a lot of the time. With set thresholds and goal posts that can be achieved. At best, Uni will only give you a small tour of the potential education available to you. It is the collective education of all the students you interact with that is important. Challenging new ideas, replacing outmoded ways of thinking, reinforcing beliefs with evidence or just learning by observation by watching and interacting with your peers. In my opinion, that is the crux of the Uni experience. Classes are food for thought, the actual thinking comes by discussing it with your peers. At least ideally. Often, hanging with peers in college means smoking weed, drinking, partying(various forms, including video game parties and the like) and trying to get laid.
In any case, both. It is meant to further your career and to educate you according to a curriculum. Which is why you often need to take stupid classes you give no [censored]s about.