why does sedimentaray rock form in layers

It was deopsited in layers.
Please read:
http://en.wikipedia.org/wiki/Sedimentary_rock