Dilute, pure soap solutions are a growth medium for bacteria. Unless extreme processing conditions are employed both at the user's end and the soap producer's end, bacterial contamination is inevitable. Soap manufacturers are always plagued with bugs growing in their products and include bacteriostats (chemicals) and careful handling controls in their products. Bacterial hydrolysis of SDS (also known as SLS or sodium lauryl sulate) occurs readily to produce dodecanol and inorganic sulfate. The sulfate can be reduced under anerobic conditions to sulfide. Dodecanol rapidly degrades further to CO2 under aerobic conditions. Signs of bacterial contamination include cloudiness, pressurized containers and odd smells, especially sulfide to which your nose is extremely sensitive.
Abiotic hydrolysis of sulfate would probably require a fairly high pH or a fairly low pH. Unless you have measured the pH and confirmed one of these conditions, abiotic hydrolysis is not likely the culprit.
Look on the back of your hair shampoo sometime. You will see one or several ingredients near the end of the ingredient list that are the biocides (methylisothiazolinone, benzalkonium chloride, potassium sorbate, methylchloroisothiazolinone, BHA, BHT, etc...). These bacteriostats/fungicides/algacides are required for the shampoo 'concentrate' to remain stable on the shelf.