We must first remember that white magic was considered magic that made people feel better, and black magic was magic that made people feel worse. Now we must consider that chemistry was originally referred to as the black art.
Chemistry comes from the term "chemi" which comes from Ancient Greek and refers to the Black Land, which was the term for Egypt due to black soot left after the annual flooding of the Nile River (this black soot fertilized the land). Although some speculate the term "chemistry" came from the term al-kimia which means to cast together.
To be more specific, the Greek historian Plutarch (46-120 A.D.) referred to the land of Egypt as Chamia, and from Chamia, or Chimia, comes the term Chemistry. It's also sometimes referred to as Chymistry. Scripture writes of the land of Cham, which is in reference to Egypt, the Black Land, or the birthplace of Chemistry.
The Greeks learned of the Black Land and of the Black art through people who traveled as traders between the two lands. The Egyptians are considered by many to be the first to mix various chemicals to come up with substances, many of which we still use today (such as make up, perfumes, soaps, dyes, distillation, leather, glass, alloys and amalgams, and more).
So Chemistry was learned by the Greeks from the Egyptians, and the Romans learned it from the Greeks and the Egyptians. Physicians would eventually learn of various herbs that would be mixed in such a way by apothecaries who would provide remedies to the physician. In this way, the chemists, the pharmacist, was a middle man who worked between those who discovered and found the various herbs and the physician. It wouldn't be until the 5th century A.D. that the Arabs would form the first apothecaries who worked between the physician and the patient.
Chemistry was still a vague skeleton of the Egyptian art all the way to the 19th century, at which time science became more prevalent in the United States and Europe. Since then the art of Chemistry has grown into the full and flourishing tree -- the full and flourishing complicated tree -- that it is today. Thus, Chemistry essentially started out as an attempt to blend various roots and herbs into remedies. And thus we have the birth of the pharmacy profession.