Most of us have been there when our child is name calling or using swear words.
It usually brings a big reaction in us.
We respond harshly or we aren't sure how to respond at all.
And that is often where the desire to swear arises from with our children. They notice the reaction it brings up in us. Seeing this reaction is compelling to them.
Or perhaps name-calling can be something a child turns to when they are feeling grumpy and disconnected.