Like trees in a forest, corals are in competition for space and light in a reef environment. Because of this, they have evolved ways to defend themselves against their neighbours and these involve stinging with so called 'sweeper tentacles' or indulging in chemical warfare.
Many species that find themselves thrown together in captivity do not occur together in the wild and it is often observed that some corals are prone to damage from neighbouring animals. Soft corals tend to use toxins to fight for space and it is often wise not to mix them with more demanding SPS (small polyped scleractinian) hard corals such as Acropora, a situation that is easily avoided by noting the differences in light levels and current that these animals prefer. LPS (large polped scleractinians) hard corals such as Galaxea are more likely to nettle their neighbours using long tentacles and need to be widely spaced to avoid injury.