SCOTUS also said that black people born in America weren't citizens and that rounding people up into concentration camps based solely on their race was A-OK. SCOTUS has a long history of tyrannical bullshit rulings, so what's your point?
Blatantly unconstitutional "rulings" don't make DHS's behavior legitimate; they only destroy the legitimacy of SCOTUS itself.