Carpet and upholstery shampoos contain detergents and alkalis. Many need to be mixed with water, so must be applied sparingly to avoid getting the carpet or upholstery too wet. It can go through to the floor damaging any backing on the carpet, or items behind the upholstery.
Any soapy water poured down the drain becomes a pollutant.
Alternative
Use dry foam shampoos which neither saturate the fabric or pollute the water.