Well actually they don’t. The pan’s surface is roughened by sandblasting then a Teflon primer is applied to the surface and baked. The Teflon becomes embedded in the tiny cracks and crevices and can’t escape.
Teflon can’t chemically bond to anything but it can mechanically get stuck. For example imagine covering yourself in slippery oil and trying to squirm through a mouse hole. No matter how slippery you are, you still won’t be able to fit through. That’s how the Teflon stays in the pan – it physically can’t get back out.