There is really no reason for a spider that survives just fine on land to evolve a way to live underwater. Then have the intelligence to know exactly what to do to be able to survive. Did it go to diving school? Nope. The intelligence was given by God upon creation. The spider creates a bubble of air underwater so it can have a place to sustain itself. it can live in the bubble, eat inside it, and lay eggs inside it as well.