Water is a great solvent. It’s neutral and doesn’t provide any strong positive or negative effects. It just helps components to mix better and to transport active components.
Sodium Lauryl Sulfate is a surfactant. It helps cosmetic products to remove all the sebum and dirt from your skin. Water can't dissolve sebum on its own because sebum contains oils. Surfactants help water get into sebum and wash off all the unnecessary stuff from your skin.
The component also helps to form a nice foam. The foam allows to spread the product evenly. which is important for good cleansing.
The component is researched quite well. Studies showed that it doesn't have any negative impact on human health if you apply it to your skin. It can be toxic only if you take SLS inside, but we doubt that somebody likes to drink shampoo or eat soap.
However, the component has its negative side. It can dry out skin or hair too much. You can suffer from this effect if you have dry skin. Plus it can make your hair less protected because natural sebum works like a barrier. Washing it off completely isn't the best idea.
Cocamidopropyl Betaine is a pH 4.5-5.5 liquid that is used to improve the overall efficiency of the formulation. It’s usually combined with different surfactants and is used because of its cleansing efficiency. It helps to remove sebum and dirt from the skin and hair. It also works as a foaming agent helping to make a pleasant foam.