I think they have the answer to this online regents answer and a non regents answer
The purpose of a cell wall within a plant cell is to provide the cells with protection and structure. It allows also allows the plant to grow tall and strong, cell walls act like a shield and a spine for a plant.
Fossils as the layer of rocks compresses the remains and the heat alters the remains