Secrets can be fun and sexy. Maybe you're into leather but only one other person on the planet knows it. Perhaps you enjoy spanking but would never tell your colleagues about it. You might even have a friend-with-benefits but it's a complete secret from everyone else in your friendship group.
Keeping a person secret, however, isn't as sexy or fun as one might think.
People have affairs. They date people they're reluctant about. They have relationships outside of their normal sexual orientation and aren't able to reconcile that with their public personality. We can either judge these parts of others' lives or just accept that they happen – and will continue to happen – as they have for the history of mankind.
I was with somebody who kept me a secret once. I was 19, going on 20. I was a student, he was a professional. We had mutual friends. I knew his colleagues. He was five years older, and in a failing relationship, – or so I was told.
In my naivety, I thought his reasons for keeping us a secret were rational. He said he wanted to wait until I finished university. He made me believe he wanted to "make sure it was real" before telling the world. He stressed how he wanted to protect me from unwanted attention or judgement.
These were all covers for his cowardice. He wanted to protect himself, and nobody else. That's what secret-keepers do. None of his reasons were legitimate or permissible. I just didn't know any better.
If you don't want to tell other people in your life about a sexual or romantic relationship you're having, it's your prerogative. It does cause you a lot of extra stress, though. Hiding is tiresome. Lies are wearying, and excuses get tangled up and confusing. Usually, also, if there's reason for a relationship to stay secret, somebody in/related to it will be getting hurt.
For argument's sake, let's just assume you have your reasons for keeping a relationship secret. There are some valid ones out there, e.g. you're divorced and you don't want your young kids to think one of their parents is being replaced, or you're in an open relationship but you're not comfortable telling anybody in your professional life as such. Perhaps you even just prefer to compartmentalise your life and keep your lovers completely separate from everything else. If you're okay with what you're doing, well, I suppose it's okay for you then.
Objectively, what's not okay is asking somebody else to lie for you. You can keep all the secrets you want, but you can't ask others to do the same in their lives. You can't control others' thoughts, feelings, actions, or reactions.
It's not acceptable, say, to ask someone you're dating "on the down-low" not to tell their friends. Why? Because you're robbing them of their agency and ability to confide in people who know them and can provide them with care and advice. People talk about their relationships with their friends to better understand them and make decisions. Nobody has any right to remove that opportunity from another human being.
Secret relationships always have an element of shame to them. Either you're ashamed of a person, ashamed of an act, or ashamed of a connection. When asking yourself if it's every okay to keep someone – or something – under wraps, what you should really be asking yourself is why you feel the need to.