Fungi and animals both fall under the same phylogenetic category [eukaryotes] and are close to each other in comparison to bacteria, which are a different phylogenetic category. This means that the genetic makeup of humans and fungi has similarities because of their existence from the same evolutionary line. Both of them share various biochemical similarities.
Any drug that is designed to attack the fungi will most probably have an adverse effect on the human cells as well. For this reason, it is difficult to develop effective nontoxic antifungal drugs. Any toxic drug that is lethal to fungi might be lethal to humans [also act as host to fungi] also. On contrary, bacterial cells evolved much prior to humans and the bacterial genetic makeup and cell structure is different [as bacteria are prokaryotes and humans are eukaryotes] from that of humans. Drugs made or developed against bacteria generally do not harm the human body easily and for this reason, it is much easier to produce potent antibacterial drugs.
Careful observation of the phylogeny shows that fungi fall under the category of eukaryotes. As humans [in animals] also fall under the eukaryote category, formulating a drug that would only [specifically] target the fungi is difficult as compared to that in the case of bacteria [prokaryotes]. The reason for this is that the drug might harm the human body as well because fungi and humans share various biochemical similarities [because of similarities in genetic makeup].