That's because the jellyfish has a nervous system, but no brain (not at all unlike some drivers I've encountered on I-95) so its reflexes act independently.
The lion's mane is the subject of one of Doyle's Sherlock Holmes short stories,``Adventures of the Lion's Mane . ''