The LAWFUL redistricting of states can be based on race to disenfranchise a race or ethnic group. Is that not racist?

Racism takes many forms. Stereotypes come from somewhere though...