In many circumstances - including when that person is married to a US citizen, or when they'll likely be killed on return to their country of birth - it is indeed crazy and cruel.
(In more ordinary circumstances it's merely arbitrary and unjust.)
Yes, this is by no means only a U.S. problem. Some countries are worse, even where birth rate trends seem like they should make it more obviously self-destructive. A tendency towards xenophobia seems to be an unfortunate human universal, although one we can sometimes overcome.
(In more ordinary circumstances it's merely arbitrary and unjust.)