Cause of stratification?

Here are examples of exposed stratified rock.

Image

Image

We see parallel layers and then massive erosion after the layers were deposited. This pattern is so common we don’t even think twice about it. But, if you think about it, what would cause this pattern? Why would layers be parallel? Where did the sediment come from to form successive layers? Why didn’t erosion occur while these layers were formed? What caused the erosion to expose the strata only after all these layers were formed?

https://debatingchristianity.com/forum/viewtopic.php?p=1055356#p1055356