In the case of a settlement agreement, the employer does not want other current employees to know that it is willing to settle a lawsuit or complaint for a certain dollar amount. Your case may be more valid than others, or your attorney might have a reputation for going after employers, so the employer may feel it is in its best interest to settle your case.
As for severance agreements, employers do not always offer everyone an agreement or the same amount of money. The employer may base the dollar amount offered as severance on the years a person was with the company, the salary level of the employee, if the employee was ever involved in any disciplinary actions, if the employee had good performance ratings, or any number of subjective factors. Since severance agreements are not required by law, they can be based on something as simple as whether or not the boss liked you.
It does no good to tell other employees when you receive a windfall severance or settlement amount. Since it is usually in the agreement that you cannot talk about it, you are taking the chance of losing the entire amount you were paid for one moment of bragging. If the other employees find out that you received a higher amount then they did, you may find yourself in the middle of their discrimination suits. When asked by co-workers about what you received, the best answer is to tell them that your attorney told you that you cannot talk about it.