Natural selection. Only spiders that were more resistant to the pesticide lived through the first spraying of the pesticide, thus we're the only ones that could reproduce. This in turn made the offspring of the previous generation more resistant as well; thus making the pesticide less effective.