Because unfortunately many of us weren't born into wealthy Families that have an excellent cash flow, so they don't need to work, but many of us weren't so we had to work when we could for extra spending cash as even bread and bologna costs money. I used to work with NM State Police SWAT Team after classes and on weekends
In addition to what Arthur Wright answered ... They work to gain experience ... Or the fact that ANY work looks better on an application than NO work.
What else is there to do? You must work hard before you can play hard. My interns get paid $29 an hour and gain a substantial amount of experience. Once they graduate, they can easily get multiple offers. Offers, as in many companies competing with one another in offering the person a job who then gets to CHOOSE which one they want to accept and work at. Some stay loyal and accept offers from my company. Other want's to experience something different.
Either way, with a few productive summers of internships under their belt they usually start their first job after college a couple of levels above entry-level.
I attended a pretty high ranking university and even the wealthiest of wealthy kids with notable last names had internships during the summer. If not, they were working on their ideas with other fellow students and pitching to investors. Nobody "partied all summer long". Maybe the first week of summer and once every 2-3 weeks. But the rest was work, work, and work.