Cationic Surfactant
Give the water-loving end a positive charge and the molecule stops behaving like a cleanser. Skin and hair surfaces are net negative at ordinary pH, so a cationic head is attracted to them and stays after the rinse. That is the point of it: this is the class behind conditioners, detangling agents and the soft, coated after-feel of a body wash that deliberately leaves something behind.
They are poor at washing. A material that clings to a surface is not one that lifts things off it, and cationics foam badly as well, so they are almost never the cleaning agent in a formula even when they are in one.
The rule that shapes the ingredient list is the incompatibility. Put a cationic and an anionic in the same water phase and the opposite charges pair off into an insoluble complex: the mixture clouds or curdles and both are wasted. That is why conditioning is usually delivered from a separate step, or from a formula built without an anionic in it.
They are not chosen for mildness. Some have an antimicrobial character and appear at low level as part of a preservative system rather than for feel, and several members of the class are documented contact allergens. None of that makes the class dangerous. It makes it a sensible thing to look for on a label after a reaction you cannot otherwise account for.