I often see the argument that it's a desire to opt out of womanhood or move away from it because of the expected gender performance. But I'm not sure it's that clear in many teen girls' min. I wonder if it's more that a certain subset of girls realise they are not able to fit in in the expected way and so feel like a failure as a girl, or that they can't do it properly - so the message that they must be a boy is a solution that seems to make sense. Especially when it comes with all the affirmation, coolness and special trans "family" - and people don't tend to tell them all about the downsides, dangers, the possibility of changing their mind etc. I've seen detransitioners actually saying they had no idea they could be GNC and still be a woman, until they discovered radical feminists and their take on it, which is so tragic.
As a massive tomboy in the 70s and 80s I know this is how I felt. I wasn't gay either - I just couldn't "do" femininity and I knew trying to made me look silly. I didn't feel accepted by girls, until I was grown up really and could find like-minded friends.
Luckily it was the 70s and 80s and I remember some teachers actively celebrating my achievements at "boy" things like airfix and tree climbing instead of suggesting I was a boy.
Re anorexia, I think it's an important comparison. People with anorexia feel incredibly strongly that their body is wrong. It doesn't mean we have to agree with them or help them to harm it.
I also think trans/NB identity appeal to teens who generally have problems, suffer from abuse or don't fit in, and are seeking an escape, new identity, attention, affirmation and support, which they can get in spades by going down that route. That's one reason why it's so dangerous - those reasons get disguised and muddled up with "gender dysphoria".