This is another theme which Whitman confronts head-on. After all, he spends half the poem talking about the soul, which is a pretty spiritual concept. That said, Whitman always has trouble doing like other people, and his use of spiritual imagery is almost always totally different from the stuff you generally hear about in organized religion.
Comparing the soul to a spider is an insult to the idea of the soul. The comparison is part of a subtle assault on religious ideas.