However, it is quite evident that professionals are _against_ immigration of other professionals because that directly threatens their professional stability.
So, we know immigration, on the whole is good. We know that immigration from poor countries allows those people to better their lives -at the expense of undereducated (blue collar) locals. But professionals don't quite care, actually, we prefer this since it makes products and services cheaper for us. But once the immigration threatens our lifestyles, then on, no, immigration is bad it drives down wages, it threatens quality of work, it allows exploitation and so on. When push comes to shove, we're all protectionists of varying degrees.
You don't have any justification for making programming a license-based profession. You wouldn't want that even if you are an American citizen. It makes things significantly harder and more arbitrary when you have licensing requirements (just look at how hard each of USMLE, CPA, bar, CFA, etc. are, even for US citizens). Engineers, for example, can be licensed, but apart from public contracts in civil, mechanical, or electrical engineering, few employers care if you are a 'P.E.'
Evidently not, as foreign doctors aren't allowed to immigrate to the US and practice medicine without first going through a costly and onerous relicensing program. As it stands, all foreign doctors, even from first-world nations with statistically better health outcomes than the US like Germany or Japan are all deemed unqualified to practice medicine in the US: http://www.nytimes.com/2013/08/12/business/economy/long-slog...
The real question is why programmers should be singled out for this kind of treatment when US doctors are the highest paid in the world, price-per-procedure is the highest in the world, and medical bills remain the number one cause of bankruptcy.
Further, a global workforce is only one component of free trade. What about a global retail market? Did you know that there is presently a federal law barring the re-importation of prescription drugs from nations where they're sold for pennies on the dollar? That form of free trade is bad for the bottom line of big corporations, so it is illegal.