I've seen public ridicule change the behaviour of certain people over the years. However, that takes a certain type of person to own up to what they're been doing, and have some emotional intelligence to change which unfortunately is quite rare.
They have to both care and have the intelligence to understand the source of it. If the motivation behind the stupid posts is that they're intentionally trying to manipulate people, troll, or because they're just dumb as a box of rocks... it's not likely to work.
And, of course, other posters know this-- so in a lot of cases people just don't bother to issue the well deserved ridicule even where the source might be responsive to it. Instead they get responses with more confused people.
I think if we could always reliably and consistently tell who was irredeemably stupid, manipulating, or trolling then it wouldn't be a big deal-- removing their posts would be sufficient. But there is a huge grey area where we can't tell.