Here in the UK, some hospital consultants are referred to as Dr, whilst others are Mr, or Ms, etc.
The Royal College of Surgeons’ website is illuminating. From the Middle Ages, physicians, i.e. doctors, had to attend university and gain a degree before they could practice medicine. Hence they were called doctor. Whereas, surgeons learnt their trade as any craftsman might, as an apprentice, and so remained mister.
The Science Museum site goes on to explain the origin of the traditional red and white barbers pole – as a sign of the blood and bandages associated with blood letting. A function carried out by the original barber-surgeons; along of course with the cutting of hair.
Image: Dan Gold danielcgold [CC0], via Wikimedia Commons