Nystatin is of natural origin too. It’s produced by bacteria to protect themselves from fungi, or to create room for themselves by killing fungi.
Nystatin does cross the gut wall, though only in low quantities. That’s why it’s very toxic to fungi and hardly toxic to humans. Another reason why it’s not very toxic to humans is that it attacks a certain biochemical compound which is present in the cell walls of fungus cells, but which is not present in the human body.
Nystatin doesn’t have any significant bacterial activity. It is extremely toxic to humans if it reaches the bloodstream. It can be used orally because it doesn’t cross the intestinal epithelium in considerable amounts ( 99% recovered in feces )
I am guessing you are confusing Nystatin ( a polyene class drug ) with the Echinocandins.
Nystatin attacks the ergosterol synthesis pathway in the fungal cell wall. Ergosterol is very similar to Cholesterol found in human cells. Nystatin will attack our own cells if it gets the blood. It will cause liver damage an severe toxicity.
However, the Echinocandins target 1,3 Beta Glucan that isn’t found in human cells. They aren’t toxic to humans since its selective activity against Glucan.