Some American jurisdictions used to ban pepper sprays, and several still ban stun guns. (The Supreme Court is considering whether to hear a case about one of the remaining stun gun bans; see this post, which quotes a friend-of-the-court brief I filed in that case on behalf of Arming Women Against Rape & Endangerment.) And more jurisdictions ban pepper spray and stun gun possession by under-18-year-olds; for why I think that’s unconstitutional in the United States as to older minors, see this article.
Note also what I call the anticooperative effect of law. Some people might react to this by not carrying pepper spray. But if a woman is carrying the pepper spray illegally and successfully fends off an attacker — or unsuccessfully tries to do so — will she go to the police so the attacker can be caught and his next attack prevented? Or will she keep quiet, since she doesn’t want to be prosecuted herself? (Note that pepper spray possession is apparently just punishable by a fine: not likely to greatly deter people from carrying, but likely enough to deter many pepper spray users from going to the police.)