While I don't teach my kids to swear, I would never punish them for swearing in certain situations.
Here is just one example. Let's say my daughter is being groped by some jerk in public. If she yelled out, "get your f***ing hands off me!", I would deem that 100% fine. It gets her point across, draws attention to the jerk, and sends a non ambiguous message that she won't put up with his actions.
But if she is just mad at her brother for whatever, you bet she is going to be in trouble if she calls him anything attached with the f-word.