Anybody who tries raping me is going to either look down the barrel of a gun and flee, or they will eat a lead salad if they continue to attack (assuming I don't let them get me before I can react). That's if I'm not able to just run away as fast as possible. Even if I don't kill them or deliver a lethal shot, if they are hit they likely to need to see some sort of medical professional soon if they value life and limb, and those medical professionals are bound to report gunshot wounds to the authorities.
My mother was raped many years ago, before my sister and I were born. Of the 4 girlfriends I've had, only my current one has not been raped. Plenty of my female friends and several of my male friends have told me they've been raped or sexually violated in their lives. I live in the rape capitol of the US, with 2.5 times more rape going on compared the national average. (my mother wasn't in this country or even continent when she was, but the rest I know were here)
My family has instilled a love of shooting in me. With the thousands and thousands of rounds of practice I've had just with my XD I could put 3 .45 hollowpoints in someone's eye in a matter of seconds, including unholstering. If HRT weakens my strength enough to widen my 3 shot groups, or the time it takes to make them (I practice by drawing and trying to land 3 shots in the same spot as quickly as I can, then reholstering, retrying), I have even more practice on my 9mm and .22 pistols, and they are easier to shoot (plus they hold more bullets). Furthermore it's very much legal to carry a gun and defend yourself with it where I live - and I carry every day.
I've had to draw down on people on a few -really scary- occasions - I have pretty bad luck with people I think. Lots of dealing with homeless and drunks. Now I try to avoid them at all costs. 4 lumps of still-painful scar tissue from being kidney-punched with brass knuckles are a pretty good reminder of that fact. If he had decided to punch me in the head/throat instead, or if I let him keep punching, I might not be alive right now. Same deal if he had a knife or some other deadly weapon. However I've never had to shoot anyone, the gun is a pretty good deterrent to physical violence and every time they have just ran away (and I ran away too, as soon as I could). I hope I never have to again - it's been over a year since the last occasion.
I've had plenty of friends taken advantage of by scumbags, almost always with weapons. The times I've had to pull a gun on people, there was always a weapon but (luckily) never a firearm involved (other than mine). Once it was 4 guys, one of whom had a baseball bat - and all of them bolted away when my gun came out. Who knows what other weapons or intentions they had - it's pretty easy to hide some pretty deadly stuff. If they all had really gone for me, I may not have been able to shoot them all before they could stop me, but none of them wanted to risk being shot despite their numerical advantage, so they bolted. Nobody wants to get shot. Every time I've had to draw, I've called the cops as soon as I was able to, and gone through the whole process to try to get them caught (which has been rather fruitless so far). I won't let myself be one of those taken advantage of.
I know in most places gun control is a little more tight. Furthermore not all people or societies are OK with using such lethal methods of protection. Some places punish you just for fighting back, in an effort to reduce violence and death. To each their own. But where I live it's legally OK, and I am -totally- fine with hurting or even killing someone if they try to violate or kill me and I've ran out of alternatives. It's them or me. If I don't stop them, or make them seriously reconsider ever getting violent with someone again, or get them put in prison, then they might just do it to someone else after they're done with me, and the horrible cycle continues.
I've seen what rape and assault can do to a person - and I do NOT want that happening to myself.
I think it's a good idea to have some form of personal protection - be it taser/stun gun, pepper spray, knives, firearms, martial arts, a simple cell phone, or whatever you are ok with using and is also legal to own and use in your area.
My mom and sister once got a guy with a club to back off just by holding their cell phones up like they were filming him and calling the police. You don't need a gun to fend off an attacker. Turns out he was on parole, and by coming at my mom and sister with a club, he violated it, even though he backed off. Even little things can make a difference, if you're in a sticky situation.
I myself prefer to hedge my bet. I'm allowed to legally carry a concealed gun in most situations - so I do it. But I'd MUCH rather just avoid conflict in the first place.