How did the word 'quack' get chosen to represent a dishonest doctor?

It might origiante from the word "quacksalver." A quackslaver was a sixteenth century word meaning a peddler who sold questionable medicine in the streets, often going from town to town. They often said their ointment, cream, vitman, or whatever they were selling could cure anything. These people pretending to have a cure came to represent a modern-day doctor who sold a treatment that wasn't proven to work. In searching medical treatment, it would be best to avoid this kind of doctor. These "quacksalvers" were also known as "Snake Oil Salesmen". Which is decribed as a person or organization that gains monetary benefit for the false information, service, and/or products, promised to provide a so called cure or service to the ailing (sick) and in need of healing consumer.