I am not sure whether keeping salaries confidential is good for the employer, employee, neither, or both, but you are stating what appears to be the most common belief.
Different people have different preferences, and some managers probably have mistaken beliefs about what is good for them and their employees.
Different people have different preferences, and some managers probably have mistaken beliefs about what is good for them and their employees.