But this isn't related to the surveillance thing as such. Criticism of this racism, if it exists, should be targeted at some combination of the prejudice in the police agencies, the leaking of the data that's supposed to be locked in a vault, and at a stretch, the lopsided impact of the laws on various racial groups.
Still it's trivial to have algorithms to identify the race of the people they have data (heck, even just "call metadata" for). To give an obvious (if slightly non-PC example, if you're from a specific part of Baltimore and you're called Jermaine, you're in all probability Black). And Jesus Mandolito in Southern California is probably latino. And of course they can cross-corellate with databases, like social security info, police records, birth certificates, and the like.
Plus, not every population / race is targeted equally. Consider Middle-easterns vs Icelandish people for example. And not everyone is them is an equal target for later data use.