In Latin, sarcophagus means ‘flesh-eater’.
When the Romans would open up the tombs that would store the dead commoners of Egypt, the bodies were so decayed (because they were not embalmed) that the Romans thought that they were meant to be in that condition.
They thought that the bodies were put in the containers to rot, so they called the container ‘flesh-eater’, or ‘sarcophagus’.