No, that doesn't sound right. It doesn't matter which particular algorithm you're thinking of. The issue here is at a different level.
Let's consider an AI that weighs in on hiring decisions. Let's consider what it might make of maternity.
Decades ago, it wasn't unusual for a prospective employer to ask a female applicant whether she was planning on getting pregnant. Society decided that wasn't acceptable, and made the practice unlawful (as well as forcing employers to offer paid maternity leave), despite that, from a profit-seeking perspective, that is valuable information for the prospective employer to have.
Let's suppose an AI has been trained on a dataset of previous hiring decisions, and some measure of how much value those employees went on to deliver. Let's suppose it's also told the age and sex of the applicants. It might notice that female applicants within a certain age range, have a tendency to have a long period of zero productivity, some time after being hired. Having noticed this correlation, it would then discriminate against applicants matching that profile.
But wait!, I hear you think, Why did we provide it data on sex and age? Remove those data-points and the problem goes away. Not so. There could be non-obvious correlations acting as proxies for that information. The system might detect these correlations.
In a parole-board context, suspects' names and addresses could be proxies for ethnicity, which could correlate with recidivism rates. The 'correct' behaviour for a correlation-seeking AI is to detect those correlations, and then start to systematically discriminate against individuals of certain ethnicities, even when their crime and personal conduct is identical to another individual of a different ethnicity.
Back to our maternity leave example, then. It's an interesting exercise to come up with possible correlations. The ones that occur to me:
* Given names (if provided to the AI) generally tell you a person's sex
* Given names also fall in and out of fashion over the decades, so there's a correlation with age
* The topics a person chose to study at university, can correlate with the person's sex, as well as their age, as some fields didn't exist 40 years ago
* The culture a person is from, may impact the statistically expected number of children for them to have, and at what age. Various things could act as proxies for this.