She said it because she felt hurt and so she's lashing back out at you. I'm sure that you already knew that, right?
Yeah, she shouldn't say that, but I've recently attended a couples workshop with my honey, and one of the lessons that we both took home was that if an argument turns dirty or someone behaves badly, the other person is rarely innocent, and if your approach following arguments is one of self-righteousness, then your relationship is doomed.
So yes, she says something immature and she needs to stop doing that. She's wrong for doing that and she needs to learn some better ways of approaching arguments. However, no one is perfect and expecting your partner to be perfect won't work, so you both need to be able to do repair work after a bad argument where one or both of you behaved imperfectly, because it will happen in all relationships. All of them. We all have moments where we aren't perfect angels.
So, what happens right before she says it the brought the argument to that point? Why does she feel so frustrated or angry that she said something immature to hurt you back? Do you know why she felt hurt? You need to take some responsibility for yourself and admit to your part in the argument, or all your relationships are doomed, even if the next one isn't with someone who resorts to immature name calling. There will be some other reaction that isn't perfect, and you'll have some sort of culpability there, too.