We seem to have all kinds of capacities to create identity. My guess is it is part of creating group cohesion and it can be very flexible, you can identify with being working class, or a member of a family group or tribe, a member of a caste or religion, and all kinds of overlapping things as well. They anchor us to other people to place and also create a kind of way to think about ourselves, to be self-concious.
In 2019 we also identify with political wings, corporate logos, pop stars, fandoms, subcultures, sexual orientation, hobbies, ad a thousand other things. Maybe so many because the more we are disconnected from others the more we try and compensate, or our very large communities mean we need to create smaller ones of a more natural size?
This whole business that these are about our authentic self is pretty bs though, a lot of the time they cover up our authentic self, they act as a sort of mask. It's getting behind those masks where we get to see ourselves most truly and openly, and I think at least realising that they are constructed identities is part of becoming mature.
FWIW, sexuality as a form of identity isn't ubiquitous across time and culture. People having some sort of innate sexual interests doesn't seem to correspond with those being noted as an axis of identity.