Why do we use soap and detergent to clean clothes?

Why do we use soap and detergent to clean clothes?