He was bitten by a radioactive spider and it altered his DNA giving him spider-like abilities where he could crawl on walls, jump extremely high, and use spider-sense. Shooting webs from his arms was...
Even though the spider had been altered by a gamma source of some sort, it was still a spider. It was pure instinct. I must have felt threatened for some reason.