For me, open source is also political: it allows programmers to help each others so that the hard work doesn't have to be repeatingly re-crafted and not allowed to be used between projects.
It also set a better set of background rules for the project, it's not under the rule of managing: at the end, the result is a code of better quality and longevity.
Know that the computer science subject is much vast, and there are some pieces of software that are so much complex that there are not so many competent people to write them, maintain them, and also add interesting features.
I really find your argument "tons of programmers would lose their jobs and the industry would shrink" very misleading, not only about the software industry, but for the world in general. Remember the web bubble: it's easy to fool not-programming people in a company. Open source is safe way to put a barrier to that.
You also have to think that software is not like many other industries: you deliver something which is volatile, something capitalism can't really work with. Just imagine if we were able to duplicate physical objects, but you would need to pay for each aspirin pill you duplicate, because the molecule is kind of "owned" by somebody. That could makes very little sense. Now think about copying pure, clean water (which will one day become expensive): do you think it's ethically and philosophically correct to make people pay for such thing ?
If programmers lose their jobs because of open source, it's maybe because they are just unable to reproduce the same kind of software quality, so in a way, they deserve to be fired. But that doesn't mean they should be less programmers having a job: it's just a matter of community, teamwork and ethics: companies should pay programmers either to implement solutions for problems using existing software, or else, hire more competent programmers who can add features for an existing code.
Take the iOS, windows phone, symbian and android: those are 75% doing the same thing, meaning almost same "wheels". It's just different flavors, but in the end, a lot of money were spent because companies wanted to survive to their ideals.
Open source is not just political, it's also about innovation: how do you want to give reality to new idea if you have to restart everything from scratch over and over ?