You also learn other skills that come in useful in your career, though I agree some can be worthless. I hated some of my classes in college, particularly the writing class requirements, but even those are helping me today because almost everything requires some sort of clear and coherent writing.
Its only 2-3 years if you work hard to graduate early, during which you'll have many opportunities to try out various ideas and meet many of your lifelong friends and likely, cofounders. If you don't have much money, excel at a state school and graduate with a manageable amount of debt, or better yet, work hard and get a scholarship.