People keep secrets, because they don't want others to know the information. Maybe it would embarrass them, maybe it's potentially dangerous, maybe they will get in trouble, or maybe they just want their privacy.
We should keep secrets, unless they are harmful to ourself or others. It's good to have some privacy and some things you should keep to yourself. However, let's say someone told you they were going to murder someone, obviously you wouldn't want to keep it a secret. You would want to tell the police.