well there's nothing really fair or unfair about it. cop stops them for something, find out they are "illegally in the country" and send them to an immigration judge, or ICE. that's the way it works (or should work). fairly black and white. leave the gray areas to the judge.
local / state police having the training in immigration law such as basic classes of admission, lengths of stay, visa & green card requirements, how to spot fraudulent documents, knowing what to do with persons "illegally in the country" when they pick them up for something else, and working with federal agencies is a good thing.
stopping someone on the street ONLY because they "look like" they are "illegally in the country" isnt.