Earth materials

Why are sedimentary rocks commonly arranged in beds or layers?