What does "by extension" mean? Culture is voluntary. You can (and should) walk away from a flawed culture. Race is an unsheddable fixed attribute.
Meanwhile, both culture and race see more variation within groups than they do between groups, making discrimination a losing proposition even aside from its inherent immorality.