Does it really make sense to spend money on CS education while importing cheap H1B labor?
Yes it does. Unless you do a job that requires direct person-to-person interaction (medicine, nursing) or tied to regulation by necessity (law), or that requires hand-on work (utilities), you are going to compete with H1B and and global workforce no matter what.
Deal with it. That has been the norm for, what now, 15 years? For 15 years I've been told that my career is going to go poof because H1B labor or because some guy in Bangalore makes 1/5 of what I make, as if software/IT work can be directly compared to picking up fruits or something. In my first 5 years of work, I doubled my salary, and in the 15 years that followed, I've doubled it again.
And I've also been laid off a couple of times, one time 6 days before my first child was born. Tough shit, such is life. You adapt, you fight, you learn, you re-learn, you borrowed Teddy Roosevelt advise ("“Whenever you are asked if you can do a job, tell 'em, 'Certainly I can!' Then get busy and find out how to do it.")
We have to compete against H1B workers and a global workforce? Yes. End of the world? Yes if you suck.
To compete, you need to build your network, and you need to have specialized skills that are on demand. And that requires a baseline education, CS education or something comparable, or related experience.
This has been a fact like, forever. H1B workers and globalization are just a new constant in the polynomial.