Children are naturally quite pure at heart. When they are exposed to the crudeness so predominant in the world today, they feel hurt. Their vulnerability has been violated. That crudeness, having had such a powerful influence upon them, is perceived by them as power and strength. They need to react to that violation with power and strength. Otherwise, they feel like they would crumble and be devastated. They decided that through this power and strength, they would take on those crude values as a defense, as an attempt to claim power for themselves. It is, of course, a facade.
You see this manifest in many forms in adolescence, and also in many adults who have never worked their way through it. They may take on a tough exterior, dress in rebellious ways, behave sarcastically, negatively, or crudely.
When children are young, parents naturally try to protect them from the dark, crude world. Children sense that protection as an affirmation that they are not yet adults. Children grow up. They want to be big. As a result of all this, they associate darkness with adulthood. Crudeness becomes the thing that is forbidden unless you are an adult. So, we can see that morbid, foul, and inappropriate dress and behavior becomes for the child a declaration that they are adults, that they are big, that they understand the world and that no one is pulling the wool over their eyes.
The best way for parents to deal with this is, number one, to understand it, to be aware of it. The light of awareness heals. Through that understanding, you can begin to work with it wisely. If you attack it directly, you may well prompt the child to defend, which would only compel them to act even more harshly. But how this is appropriately approached is not a cookbook. It depends upon the unique nature of the child, the parent, and their relationship.
Certainly in every case, the true adult is one who is capable of resting in and speaking from that place of vulnerability deep within. True strength is found in the refinement of the depth of your being, not in the crudeness that so many wear on the surface.