Before the development of modern soap powders and detergents, cothes were washed using blocks of hard soap.  It was grated so that the soap disintegrates into the water.