From the Roberts majority opinion:
The Voting Rights Act of 1965 employed extraordinary measures to address an extraordinary problem. Section 5 of the Act required States to obtain federal permission before enacting any law related to voting—a drastic departure from basic principles of federalism. And §4 of the Act applied that requirement only to some States—an equally dramatic departure from the principle that all States enjoy equal sovereignty. This was strong medicine, [weak, but he's just warming up] but Congress determined it was needed to address entrenched racial discrimination in voting, “an insidious and pervasive evil which had been perpetuated in certain parts of our country through unremitting and ingenious defiance of the Constitution.”
The dissent also turns to the record to argue that, in light of voting discrimination in Shelby County, the county cannot complain about the provisions that subject it to preclearance. But that is like saying that a driver pulled over pursuant to a policy of stopping all redheads cannot complain about that policy, if it turns out his license has expired. Shelby County’s claim is that the coverage formula here is unconstitutional in all its applications, because of how it selects the jurisdictions subjected to preclearance. The county was selected based on that formula, and may challenge it in court.
From the Ginsburg dissent:
Throwing out preclearance when it has worked and is continuing to work to stop discriminatory changes is like throwing away your umbrella in a rainstorm because you are not getting wet.