When asked for a number, why do girls give their boyfriend's number?

Was talking to a female coworker, and she told me her way of dealing with guys asking for her number, is giving them her boyfriend's number. I never understood the reason to needlessly cause problems. If the guy is saying creepy sexual shit, that's one thing. But if a guy, not knowing you have a boyfriend, flirts with you in a non sexual way, and asks you for your number, why start problems? This happened to me a few times before I got in my current relationship. A couple guys said no problem, took it on the chin. Most tried to act tough and make threats. One actually pulled up on me. His girlfriend was there too. I'm not gonna pretend I'm some UFC super fighter, but I used to box, and this dude couldn't fight for shit. He was throwing windmills that hit the top of my head, not even my face, had no balance whatsoever, and when I caught with a left hook, he dropped and literally got into a fetal position and covered his head with his hands. I might've took it too far, I was pissed because of specific threats he was making, but I hit him probably like 6 more times when he was down. His girlfriend was calling me a psycho, and crazy, etc. I guess that's what you get when you threaten someone's life. But why even take it that far? Why do girls do this and risk getting their boyfriend beat up?
When asked for a number, why do girls give their boyfriend's number?
Post Opinion