How did coffins help ancient Egyptians?

ancient egyptians didn;t use coffin.they used mummification make people into mummy altough only the rich could afford it like the pharaohs