The term ‘in the closet’ is used when one is dealing with sexual orientation. But there are other ‘closets’.
There are people who live long lives and no one ever knows how they really feel or think.
Assumptions are made and they do nothing to alter that assumption. It might be so wrong that it is night to the day.
Even if you know the person, unless ‘something’ happens and they react in a totally unexpected way, you will never know who they really are.