It used to be like that in the US. It was not until the 90s into the 00's that employers were allowed to make employees sign away their right to sue and instead use binding arbitration of the employer's choosing, or manufacturers and retailers forcing consumers to waive their rights to sue in purchasing the product, and so forth.
Judges used to throw them out. And if a contract had egregious language, it could invalidate the entire contract not just the part that is illegal.
Since the federalist society conquered the courts all of that changed.