This seems analogous to the old:
"Guns don't kill people. People kill people."
Well, sure! I get it, guns themselves don't pull the trigger. If anyone is to blame, it's people. So, guns don't kill people (then again: bullets kill people ... or maybe vital organ failure kills people :) ).
But, it is also true that with guns, it is easier to kill people. Indeed, maybe we should say:
"Guns don't kill people. People with guns kill people."
That is, it is not as if guns have nothing to do with people getting killed. As such, having some kind of gun control might make sense, or at least can be argued for: if there are fewer guns, then there are fewer people with guns, and hence we'll have fewer people getting killed, so the argument goes.
Same as with words. You say:
"Words aren't bad. People and thoughts are bad"
but we could also say:
"Words aren't bad. People express and relate bad thoughts through words"
So again, words allow people to express their bad thoughts. And, some cognitive scientists might even argue that bad words enable bad thoughts. As such, a ban on certain words could be rationalized: fewer 'bad' words -> fewer bad thoughts being communicated -> happier world!
Now, you're right: banning bad words seems to be a rather indirect way to bad bad thoughts, just as controlling guns does not get at the root as to why people want to kill other people in the first place.
Also, a 'bad' word may not always be used in a 'bad' way. Here, for example, is a video that rightly pokes fun at the Facebook policy to reject any 'bad' images from its pages:
https://www.dw.com/en/what-the-flanders-viral-video-makes-fun-of-facebooks-nudity-guidelines/a-44822692
Banning 'bad' words would be equally clumsy ... but an argument can be made, yes.