Consider also those who are 3 years into the degree and decide that field isn't for them, and they want to leave school - that's nearly $20k down the toilet which will be hard to pay back.
BTW, your logic applies equally well to indentured servants. (Years of labor enables free passage to the US and the chance for one's own farm at the end.) Since I don't like the concept of debt bondage, I distrust logic which supports it.
I'm definitely not complaining about $30k, I just wish there was some way I could directly pay one brilliant person like the one great professor, so they could speak at me in an intelligent way and give me new perspective on things that I read in a textbook.
And he's the vast minority that has such an opportunity!
I still had a great social life- interestingly, most of my roommates and friends in college didn't care for theoretical math and didn't know the first thing about CS.