I'm still 100% lost as to "identity" in context being used here even means.
In the psychological sense, "identity" is the collection of characteristics that make you
who you are. They are how you would describe yourself as a person, divorced from your body. It's the mental construct of "self" that we carry around, and it's a combination of how we see ourselves, how we want to see ourselves, and how we want other people to see us. It's an amalgam of what we like and dislike, what is important to us in terms of content of character, what we value and what we disregard.
The problem with the psychological concept of identity, is that it's entirely self-focused and subjective. None of us has any ability to impose our desired psychological identity on other people. No matter how much I view myself as witty and funny, and how deeply I wish for other people to perceive me as witty and funny... how people actually perceive me is out of my control. And I've learned over my 40+ years of life that other people just don't find me funny.
And for a normal person, with a healthy, well-developed psyche, this is okay. As we move beyond childhood, normal humans develop a multi-faceted view of themselves and understand that what we wish and what is are often very different. We learn what aspects of ourselves can be shaped and honed so that we can grow into the person we wish to be, and we can become the person we want others to see us as. But we also learn to accept those aspects of ourselves that are innate, or which cannot be reasonably molded. We learn that while we might wish that other people see us as debonair spies... we genuinely dislike martinis regardless of whether they're shaken or stirred, and that pretending to be Bond would be just that - pretense, and not real.
We also learn, as we grow beyond childhood and the self-absorption that is normal for that stage of our development, that living as a façade of ourselves, engaging in constant pretense, is unhealthy for us as well as our relationships. And we learn to accept ourselves for who we are, and to seek relationships that allow us to be our best and truest selves.
On the other hand, "identity" in the legal sense is an objective measure of what you are. It's the set of physical hallmarks and traits that allows a stranger to verify that you are who you say you are.