They may stay in a part of the plant that the spray can't reach, such as the crack between a leaf and a stem. Or perhaps their internal chemistry detoxifies insecticides. Either way, they'll mate and pass on the traits that kept them alive. Their offspring will have an even easier time surviving the pesticide. Soon, it won't kill any insects.
Good bugs die, too.
It's hard to find an insecticide that kills just pests. Spraying can wipe out the good bugs and leave thugs. Sometimes, the good bugs' behavior changes after spraying, and they no longer effectively police the thugs. And other pests may become problems after spraying because you've killed their predators, too. You could have sprayed needlessly.