Humans naturally feel more secure around those similar to us. It's an evolutionary response. It's probably minimised in the modern age seeing how exposed we are to those who are different to us, but still present. Even if consciously we may know that all doctors are similarly qualified, it's no surprise if white people feel more comfortable around white doctors (and black people around black doctors, etc.).