A software engineer could trivially illegally migrate to the US and then make money via their trade (e.g. freelance development work, app sales, pretty much anything online, telecommuting abroad).
You're right in the sense that it would be hard to get a normal 9-5 job without a visa/SSN but you're dismissing a huge number of alternative routes to income which wouldn't even depend on the person's physically being in the US (e.g. open a Google Developer account as if you were still in your home country, pay taxes there, but do it all from the US).
Plus your assumption that developers are "above" working in blue collar jobs is flawed. There are tons of fully certified Indian doctors working blue collar jobs abroad right now, developers are no better.