How would an employer defend that this agreement wasn't made under duress ? That both sides were equal partners in the negotiation about such a contract ?
I'd think the right to sue about anything is the most fundamental of the inalienable rights, because without it, the other rights wouldn't effectively exist.
But of course they can give something in exchange for signing something. You can think of it as a mini settlement.
I don't think it is great, because many people will just sign things thinking they have no choice, and the timing and mechanics of how these things happen are often used against people.
I've had exit contracts given to me. They were full of things that benefited the company and had nothing that benefited me. I said 'There's no benefit to me signing this, what do I get if I do?' They didn't offer me anything, so I didn't sign.
(Now, there are still reasons for which it is illegal to fire people, and, in part to avoid disputes over whether one of those were involved -- and, on the procedural end, in part to actually work to resolve issues that might be resolved short of firing -- employers will often apply substantial procedures before firing, and even when firing offer a severance package, potentially explicitly contingent on an agreement not to sue.)