Shampoo differs from soap in that it is designed to cleanse the hair, can be formulated for specific hair types, is non-toxic, biodegradable and able to wash off with a clean finish. Just as soaps don't work well at cleaning hair, shampoo doesn't function well as a soap because it can make the skin feel slimy.
When people try to wash their hair with soap, the hair can get damaged and dried out. This is because bar soaps and body soaps don't contain the same ingredients as shampoos. Shampoos are also varied in their formulas because hair has many different characteristics. There are shampoos for oily hair, dry hair, itchy scalps, frizzy hair, thick hair, thin hair, blonde hair and so on.
If shampoo is used as a soap, it usually doesn't work well, either. This is because soap is designed to be washed in the hair. It naturally forms a sudsy texture with lots of bubbles and washes off easily. When shampoo is applied to the skin, there is no hair there to naturally produce the suds. This can lead to the shampoo forming a slimy feeling on the skin. Because of this, it's recommended that people use soap for washing their body and shampoo for washing their hair, as this is what these types of products are intended for.