Witch doctors - back in the day - were one of the few people with knowledge about subjects such as biology and chemistry; by simple virtue of their having knowledge about these areas (about which their contemporaries were ignorant) they were capable of doing things with that knowledge that other people thought were miraculous.
In that respect, witch doctors and their ilk were in many regards a forerunner of scientists, there are however two major distinctions between the two groups. The first is that back in those days they were less likely to share information with one another, as a result their discoveries were often lost over time a large part of this was to preserve their mystique and enable them to charge obscene amounts of money - compared to today where they are far more likely to convey that information to their peers, though with limitations primarily as a result of business or security implications; the second difference being that the people around them back then were extremely limited in their understanding of themselves and their surroundings - compared to today where most people have a basic understanding of what science is capable of and if they really had the drive to, they could learn a great deal of science themselves.