> At worst, swearing too much will paint you as uneducated or abrasive,
This is the rationale for punishing children for saying the words. American parents often do not want their children participating in an environment where those words are socially normalized, and so, school staff prohibit the behavior.
Depending on the particular word and its usage, it may be language that inherently bullies other children too -- also not behavior that American parents want school staff to tolerate.