Yes, states do all sorts of awful immoral things. But blanket punishments go against the post-war consensus regarding fundamental human rights.
Not comparing the backlogs to Japanese internment, but if you look up the history of immigration law you'll realize that the country limits in the 1965 law always had racist intent.
While it was sold to the American people as not affecting demographics ("Secretary of State Dean Rusk and other politicians, including Sen. Ted Kennedy (D-MA), asserted that the bill would not affect the U.S. demographic mix."), this turned out to be extremely false, as pretty much any demographic chart will show.
Yes, that's what I mean by racist intent. Turned out some of the actions done with racist intent (focus on family-based immigration) backfired, while others (per-country limits) worked out perfectly.
But the law was passed specifically because the previous law was viewed as racist: "the National Origins Formula increasingly came under attack for being racially discriminatory. With the support of the Johnson administration, Senator Philip Hart and Congressman Emanuel Celler introduced a bill to repeal the formula."
It's very common for racism to be replaced by slightly less terrible racism! The most obvious example is how slavery was replaced by Jim Crow laws, segregation, and later the prison system.