The barber used knives and scissors to cut hair so they were the 'logical' existing occupation to pickup the medical charade.
Possibly as early as the later Roman Empire, and certainly continuing through the Renaissance into Industrialization (maybe even until the 1700s in some places) a "barber-surgeon" also performed
tooth extraction,
cupping,
leeching,
bloodletting,
enemas,
amputations, etc.
In
Renaissance-era
Amsterdam, the surgeons used the colored stripes to indicate that they were prepared to
- bleed their patients (red),
- set bones or pull teeth (white), or
- give a shave if nothing more urgent was needed (blue).