Garbage in Garbage out.
If an AI is poorly conceived - asks the wrong questions or uses poor training data and reflects the cognitive biases of the people who coded it - it will produce poor results.
In Data science circles this is known as "Garbage in Garbage out".
Take a look at this article about an Amazon hiring AI in Scotland. There is a good video in the article about half way down.
Sometimes there a funny side to discrimination..... in accents.
This a low quality mobile video reveals why technology company Sensory.com has 4 flavours of English in their Voice Command and Control - American, British, Indian and Australian..... if only they would do Scottish English.
https://www.zdnet.com/article/this-is-what-happens-when-amazons-alexa-decides-to-take-over/