Peppermint shrimp are also hermaphrodites.
One of the reasons for any organism to be a simultaneous hermaphrodite is that they may live in habitats/areas where it's difficult to find a mate/the gender ratio is skewed toward one gender/the organisms are sessile and cannot move to find a mate of the opposite gender. The ability of a species to develop hermaphroditism allows any two individuals that come into contact to mate.
For sequential hermaphroditism, there's usually a benefit to being one gender or the other (larger size for protecting the smaller members of the opposite gender, able to produce more eggs).
Unfortunately, I don't think there's any one condition/niche that works for all hermaphroditic species.