Before anesthesia
Before anesthesia, physicians were called surgeons, but they didn’t perform surgery. The keys to successful surgery on a conscious patient were quick hands and a very sharp knife, so surgery was usually done by barbers. A common way to get the job done was to lower the patient’s guard, then have 3 or 4 strong men suddenly rush into the room to hold him down, while the surgeon very quickly did his work. It was a bloody job, so surgeons typically wore dark coats. And, of course, without anesthesia, it was virtually impossible to do any abdominal surgery.
With the advent of anesthesia, everything changed. Now surgeons could take their time, and close off blood vessels. They could operate in the abdomen, and they switched to wearing white coats, to have evidence of how relatively little bleeding there was. (Today surgeons wear blue or green, due to the lighting in the OR.)
Nowadays surgeons are among the most prestigious of professionals and barbers only use their sharp knives and quick hands-on hair.