If you want other people to accept or agree with your self-identity, this necessarily means they will have input into the definition of that identity. We're not talking about how you identify yourself to yourself. We're talking about how you identify yourself to others, and what they should do with that information (if anything).
It matters, but it is not the sole or overriding factor in all cases.
This is going beyond what you asked though. You asked why a person should feel they belong or don't belong in a space or a group. You've moved on now to whether other people accept that identity or behave in the way you want related to that identity. First things first. Self-identity is not defined by others. How others act can reinforce your self-identity or it can weaken it or may have no impact.
Rosa Parks knew her butt belonged on that bus seat, even though the world around her didn't accept it
It depends on the feelings. Opinions are one thing. Feelings that are not consistent with reality are something else - usually a problem that needs to be solved, not a personal reality that should be catered to.
Rosa Parks feelings weren't consistent with reality. Reality changed. When it comes to these matters of belonging then it's all feelings and opinions. That's what societal rules are.
It depends on the special activity, and whether the people organizing it intend it to be exclusive.
If the activity is voting in in Scottish elections, your belonging to the Scottish group has very little to do with your feelings, and very much to do with whether other people actually recognize you as Scottish.
If the people running the Australian government think you're Australian, you not feeling Australian won't exempt you from their sanctions on not voting in Australian elections. Self-identity only goes so far - only as far as the end of your nose, in fact. Beyond that, how other people identify you is going to be a big factor in determining how you interact with society, and how society interacts with you.
In terms of belonging none of this matters. If I don't feel Australian I don't feel Australian. If you tell me I am and I have to vote or I'll get fined then I can decided to vote or not and you can decide to fine me or not but it won't change my sense of belonging one bit.
Clearly.
What I'm not getting is any attempt to answer this question: To what extent is trans-identity a matter of doing whatever you want based on how you perceive yourself, versus doing whatever society allows you to do based on how society perceives you?
Put it another way: Why does Boudicca, a transwoman, believe she doesn't belong in male spaces?
I think I made an attempt to answer the question I believed you were asking about self-identity. This now appears to be a different question but fair enough. The 'put it another way' sounds like a completely different question again though. I'll have a go though.
If you are talking about any identity then I think you have to separate two things - feeling and doing.
I can vote in Australian elections and not feel Australian, right?
The 'put it another way' bit of your question sounds like asking 'Why does Dave not feel Australian even though he was born here and lives here?'
The first part sounds like you are asking 'why does Dave think just because he doesn't feel Australian that gives him the right not to vote?'
The answer to one is going to be "people can feel whatever they want and who are you to tell them it's not valid?" the answer to the other "maybe it does, maybe it doesn't... what's the best way for us as a society to address the fact that no matter how much we insist Dave is Australian he doesn't feel that he is"
Or to put it another way ... if Boudicca says they don't feel that they belong in male spaces then i bet no amount of anyone saying 'yes you do, of course you do' is going to change it. There is then a societal decision on whether the reaction to that is to say 'tough, suck it up' or try to accommodate that.