As to why countries instead of races,
>The question will probably at once arise, why, if this legislation was a response to a demand for racial discrimination, was it expressed in terms of nationality? The answer is simple. As has already been shown, our actual knowledge of the racial composition of the American people, to say nothing of the various foreign groups, is so utterly inadequate that the attempt to use it as a basis of legislation would have led to endless confusion and intolerable litigation. So Congress substituted the term nationality, and defined nationality as country of birth. It is clear, then, that “nationality,” as used in this connection, does not conform exactly to the correct definition of either nationality or race. But in effect it affords a rough approximation to the racial character of the different immigrant stream
https://www.cato.org/policy-analysis/brief-history-us-immigr...
This causes problems even for skilled immigrants from Turkey today, since the stereotypes that manifested from this are applied to them as well.
On the other hand I do understand the individual issue here though. It is a bit unfair to never have a proper foothold in the country that asked you to be there. I think it would be better to limit the H1Bs more by the same country of origin metric, so that people aren't given hope only to crush it later on. And there should be a way to get a green card for those that are already here for 5+ years. It's inhumane to never allow them in properly after they spent so much time building a life in the US.