This is illegal, notoriously, police can only request AND detain someone to provide ID if they are actually suspected of committing a crime. Potentially being illegal, a neighbor calling the police or stuff like that does not give them permission to detain. They can nicely ask, but that's all.
That's specific to ICE though, where they need a "warrant", not from a judge but just from some other ICE "supervisor".
I agree that in practice there is some kind of loophole: ICE gets a "warrant" for someone that by definition has no ID, so there is no point in identifying a detainee - the immigration court will do that, later. Effectively, they seem to get away with snatching people off the street that vaguely may resemble any "warrant" they have.