it's because you run your society like a dark age fiefdom. half the country believes in noah's ark, and you can't even get decent health care.
the reality is that america is attracting the immigrants that it makes sense for it to attract given it's economic system. if you want to run a third world economy and a third world social system, you'll get third world immigrants. if you want the best immigrants, you want to study a country like sweden.
to put it another way...
the reason you can't attract quality immigrants is due to the nature of the society, as it was built by very stupid protestant white people.