Let's assume you have red and green people who are otherwise identical, and that there was systemic discrimination against green people in the past that led them to have lower incomes and lower education levels and live in areas with lower property values and higher crime rates. A naive computer model trained on objective data might find correlations between green people and high default rates on loans, for example, which might be accurate, but which aren't inherent to green people but were forced on them by external circumstances. A reasonable bank might then conclude that they should discriminate against green people without any personal bias against green people at all.
The question you have to ask yourself is: is that fair? And what should the law say about it?