Plain water can't make bubbles: its surface tension is so high that any film it forms contracts and pops instantly. A surfactant — the active ingredient in dish soaps like Dawn or Fairy — has molecules with one end that loves water and one that repels it. These line up on both faces of the film, lower the surface tension, and stabilize it.
The self-healing effect
Surfactants also give the film a kind of "elastic" behavior known as the Marangoni effect: if a spot thins out, soap migrates there and reinforces it. That self-healing is what keeps the bubble from popping at the first brush of contact.
Heads up: more soap isn't better. Past a certain point the film just gets thicker and actually loses longevity. What really drives quality is getting the dilution right, and above all the polymer. Soap is the essential base — the polymer is the engine.