I mean Wonder Woman is also invulnerable to gunfire. It's mostly that some writers are really hit by the dumb syndrome and forget about it. In general, I've always hated the idea that blunt damage and piercing damages are somehow different in their nature or something. Absolutely not, unless the world runs on videogame logic. But there is no actual difference except for the surface in which the force behind the object is distributed. If you can trade hulks with the likes of Venom or Rhino (or fucking Superman in Wonder Woman's case) then guns are going to bounce off of you, because your skin is already so durable that even the lesser distribution of force won't do anything against you.
My guess is that, at least in Spider-Man's case, they do it to keep him somehow grounded and street level. But again, that's my biggest peeve. When writers try to keep him both grounded but also able to compete with the big leagues.