It’s a form of excarnation, which is one of the three primary ways cultures handle their dead — the other two being inhumation and cremation.
The fish probably appreciated it.