Check out this article showing that spider venom may interact with ion channels the same way the key molecules in hot sauce do. These molecules, called capsaicins, have been known to cause that delightful burning sensation when you consume the seeds of various peppers like jalapenos, scotch bonnets and the ultimate Scoville-metering habaneros. If you go into any neuroscience or ion channel lab you're bound to find some scorpion venom or other neurotoxic poison, because they can completely trigger or block a response depending on how they arrest cellular activity.
In this instance, it appears the venom is preventative, trying to ward off predators by delivering a burning sensation that might not be too comfortable. Hopefully the spiders aren't trying to ward off hungry birds. Didn't work for the peppers. Sorry, spiders.