why does sedimentaray rock form in layers

It was deopsited in layers.
Please read:

Sedimentary rocks form in layers primarily because they are deposited over time in different stages or episodes. These layers are known as "strata" and provide valuable insights into Earth's history and past environments. The process of sedimentation involves the gradual accumulation of sediment materials, such as minerals, organic matter, and the remains of plants and animals, which settle and build up over time.

There are several reasons why sedimentary rocks form in layers:

1. Gravity: Sediment particles are typically transported by wind, water, or ice. When these particles settle, they tend to accumulate in layers due to the force of gravity. Heavier particles settle first, followed by smaller and lighter ones above, resulting in distinct layers.

2. Water currents: Flowing water, such as rivers, streams, and ocean currents, can carry sediment particles for various distances before depositing them. The speed and direction of the water currents influence how and where the sediments settle. As the water slows down or changes direction, it deposits the sediment, creating layers.

3. Sediment sources: Different types of sediments originate from various sources, such as mountains, deserts, or marine environments. As these sediments are transported and deposited, they form distinct layers based on their composition and characteristics.

4. Depositional environments: Sedimentary rocks can form in a wide range of environments, including rivers, lakes, oceans, and deserts. Each environment has its unique conditions, such as the availability of water, energy of the environment, and presence of organisms. These factors contribute to the formation of specific layers and help geologists interpret past environments.

By studying the layering patterns in sedimentary rocks, geologists can gather information about past climate conditions, the movement of Earth's crust, the history of life on Earth, and even the potential presence of valuable resources.