OK great. So, you're able to settle on terms both parties find awful -- but better than the alternative. Whew. But a month after you do, your opponent might go out there trash-talking. Then you do, in response. And your whole settlement has unraveled.
As a result, it is entirely normal and appropriate for two parties who aren't stupid, to agree to remain silent.
If the settlement has one party paying the other (as is often the case), you can imagine that they will pay somewhat more for a final settlement -- one that doesn't unravel -- because that's worth more.
It's nothing to do with gags or free speech. It's just the kind of painful common sense you acquire from having gone through any sort of legal dispute -- or if you haven't, that hopefully your attorney has, and hopefully you are listening to her advice that you're paying for.