Why do you have to wear knee pads?

Say you are going for a ball and you have to slide for it ,you would have to land on your knees there for you need something to protect them.