Because medical research and best practices aren’t always followed in the real world. There’s huge racial and gender equity problems in the healthcare systems that are bigger than any one doctor or hospital.
AI simply amplifies the bias present in training data. There are sometimes methods to try to mitigate this, but I’m not sure how effective they are these days.