The face scanner wasn't looking for active imperial faces, it was looking for people with Rebel/Republic records or criminal history. Apparently Mando had kept himself clear of the authorities enough to pass. Why a system that can access highly classified information like starship locations...