This rule was to shield the identities of those people from the federal government, so that those states would participate.
You may not like that but being in the United States without permission is not a crime, it is a civil offense like operating a radio station without a license or pirating a DVD, and it is up to the states to decide if they want to help the federal government with non-criminal civil cases.
I am an election judge in a state that issues drivers licenses to non-residents, primarily people in the years-long process of applying for asylum (which, by definition, makes them neither illegal nor undocumented) and I can assure you that processes are in place to keep them off the poll books.
There are more instances of republican candidates' wives voting multiple times for their husbands than there are cases of non-residents voting.
edit: the explicit reason it is not a crime to be in the country without permission is because if it WAS a crime then people accused of being in the country without permission would be granted due process, be subject to stricter rules of evidence, and have the right to access to representation, which they are not if it is a civil offense.
The government does not want due process, stricter rules of evidence, or the right to representation for people it says are in the country without permission, which is why thousands of US citizens have been deported by mistake. (but people don't seem to care because those US citizens' names end in vowels and they are deported to countries where color graders throw a yellow filter on the footage whenever a film is set there)