I lucked out and happened to turn 23 the year the property boom started, my degree would have cost me over $500K in lost opportunities and cost. In my case I started out in tech support, and had to find my way into dev.
It's definitely not "opportunity costs win every time."
My first job out of school paid me $60k/yr (2006) and I was over $100k in three. I learned a lot in my CpE and CS classes, but I gained a ton of experience at market rate I never would've gotten as an 18 year old know it all.
Not really related but even though I've spent most of my career using my CS teachings, the EE learning that was part of my CpE studies sure has come in handy with the IoT explosion. I knew next to nothing about electrical engineering when I entered university. Had I not gone I wouldn't have known how much I like electronics and robotics.