Sea cucumbers are a bit like vacuum cleaners, sucking up the sandy bottom beside the reef and taking out any food, including faeces and dead bits of other animals. They have a defence trick of launching their guts through their anus to scare predators.
This photo is in fact two photos of the same sea cucumber, with the image on the left showing it breathing in through its anus, and the one of the right showing it breathing out.