Machine learning algorithms do precisely what they are taught to do and are only as good as their mathematical construction and the data they are trained on. Algorithms that are biased will end up doing things that reflect that bias. There are four distinct types of machine learning bias that we need to be aware of and guard against.
https://thenextweb.com/contributors/2018/10/27/4-human-caused-biases-machine-learning/