Because being black isn’t a belief, it’s an immutable (without some effort or genetic condition) phenotype. So a more accurate way to put it is in the US, you can’t discriminate against someone because of their biology absent some specific and well-defined exceptions, but you may be able to based on their beliefs (except, again with exceptions, sincerely held beliefs in a wells established religion).
Because being black isn’t a belief, it’s an immutable (without some effort or genetic condition) phenotype. So a more accurate way to put it is in the US, you can’t discriminate against someone because of their biology absent some specific and well-defined exceptions, but you may be able to based on their beliefs (except, again with exceptions, sincerely held beliefs in a wells established religion).