The most amazing thing to me is that people with very high skills are put in the same lottery pool with people doing administrative jobs. What's even more tragic (for both America and the graduates) is that the more skilled they are, the less likely they can find a commensurate job back in the developing home. On a personal note, the prospect of deportation put a heavy strain on my relationship--I'm sure many have to go through the same ordeal.
If I'm not mistaken, MAs and certainly PhDs are put in a different pool when considered work visas. And if she goes for academic jobs, it's virtually a guarantee for visa and a quick route to green card. There's always some risk, of course, but a PhD in CS has better chance than almost anyone else :-) Good luck!
If your field of expertise allows, I would recommend considering Australia & New Zealand.
Australia is not too immigrant friendly lately, but New Zealand will most likely give you a permanent residence if you have a well paying job, and you don't have a criminal record.
The idea isn't that they can't get a job or contribute and thus need to leave. The point is that Americans should be preferred over foreigners for these jobs. Not supporting or denying this logic, just explaining that your point isn't really addressing the argument.