How in the hell can Confidentiality Agreements be legal for public employees?

Ex-Michigan health director got payout in confidentiality deal
Gov. Whitmer's administration agreed to pay cash to Robert Gordon, the state's former health director, in a deal to keep confidential why he left
www.detroitnews.com