Temperature and pressure at the earth's surface are minimal compared to what they are at depth. With sediments, they become converted to rocks or become lithified by burial which subjects them to higher temperature and pressure. If the temperature and pressure become too great, then the sediments will be converted to metamorphic rocks. Basically the rocks or sediments are changing in order to be in equilibrium with the new conditions.