Same way the Vikings determined some mushrooms had hallucinogenic properties, trial and error. Actually the aboriginals to the area of origin to the poisonous polyps (Indonesia or Polynesia may have been Hawaii, honestly don't recall exactly) feared these polyps due to the release of the toxins the contain. In the past before we had more understanding of science and chemistry harmful things inspired fear, usually associated with an angry god demanding sacrifice. It wasn't until "modern" science allowed us to analyze these devil polyps and actually understand what and why they are toxic. Just like everything else poisonous it is a defense mechanism which some species have actually adapted to rely on. Some fish eat the polyps and absorb the toxin and use it as their own defense. Not all palys and zoas are toxic and not all are as toxic, also some people are more sensitive than others and suffer more from less toxin. I personally have never had issues but be aware that it is possible to be poisoned by these. Most cases are due to careless handling or touching your face or mouth after touching the polyps. I wouldn't be to concerned just wanted you to be aware of the potential and avoid the worst case scenario.