That's one of these things I've wondered about on occasion. The concept of "identity" as something not only defined by you and you alone, but also completely sacrosanct, is very new. And it's also very damaging.
Allow me to put my boomer hat on for a moment and say this: when I was growing up everybody had a nickname at school. Barely anyone was called by their name, even if the nickname was just a variation on it. Your name is Brooke? Congratulations, everybody calls you Brooks now. Kid transferred in whose name is actually Brooks? Well, he's got a bowl cut so we're calling him Lloyd (from Dumb & Dumber). The just about only time you'd hear someone's real name was when school staff was talking to them. But I digress: my point is that you didn't pick your nickname. It was something assigned to you by the kids around you (and occasionally by one of the teachers). Was it rife for bullying? Sometimes, yeah. I spent my freshman year of high school dodging a really embarrassing nickname, and some people were just plain unlucky. But for good or bad your "identity" was also affected by your community, because that's where you were at, physically. What you did, and the consequences of your actions, affected your "identity". There were absolutely more rebellious kids who insisted that they "wouldn't be labeled", but even within their own cliques they had their own nicknames and their own roles to play.
Once the internet became popular everybody in it realized they could just not use their real names and instead embrace whatever pseudonyms they wanted, and use different "identities" in different places if they wanted to. This disconnection from reality feels like it was the first step towards the plague of troons we are wading through now: these people who started experimenting with different "identities" in secret on the early internet (preserving one's anonymity was important back then) paved the way to people whose identity is so completely internet-centric they don't accept the idea of being assigned anything by the people around them (see: AMAB/AFAB). And now these people are trying to enforce their internet identity upon the real world, and they're screeching when they realize it's a lot harder than just putting a checkmark on "female" on a social media website signup page.
This is just too fucking dumb. I'm going to stop waving my cane at the internet now. Where's my rocking chair? Why are these dang kids on my lawn?