Does a detergent work by reacting with acidic dirt?
So far as I know a detergent is the salt of a long chain carboxylic acid. The carboxylate function allows some water solubility. In solution, when the detergent encounters grease, the hydrocarbyl chain interacts with the grease chain. The resultant globule, a micelle encapsulates the grease, and presents the hydrophilic part of the detergent chain to the bulk aqueous solution - this keeps the grime from redepositing on the surface of your dishes.