Before being a corpse, we were someone, disrespecting a dead person (who by definition can no longer react) is cowardly and places the person in the state of an object.
So it is natural to wish even once dead to be respected as having been someone, that our life had value and that the last thing we leave of ourselves is not used for "mockery" .
And for extremes cases: imagining your body being used as a toy for a pervert is not very pleasant even if you are not there to feel it.
Some people want to donate their bodies to science/medicine, in order to have been useful one last time, often with the idea of ultimately being used to save other people. However, some researchers play with the term "science", and the person who wanted to give their body to science to save other people may find themselves serving as a guinea pig in tests of weapons aimed at killing, for example...