This was absolutely brilliantly done.
Because this isn't Anya's most closely guarded secret being discovered by accident without her consent. She made an active, CONSCIOUS choice to tell Damian that she is a telepath. Something that she was previously terrified would lead to her being hated if someone happened to find out. And throughout this little prom arc we slowly get fed the reasons that lead up to this moment. First being that while she initially saw Damian as a bratty, self centered jerk, Anya has slowly come to know him better and see a more noble and compassionate boy under all that cocky bluster.
Then there's the way Damian also mentions to her that many people try and use him in order to get close to his parents-- which she sees for herself when the other girls start swarming him demanding to dance-- hence his suspicions of her own intentions.
And the finally is the fact that, despite his own admission that his parents barely acknowledge he's alive, Damian still loves and admires them and is desperate to earn their affection.
In fact, during the Damian quiz, it's implied that Anya didn't use her powers to figure out who Damian's most beloved person was, because she already knew the answer just from knowing him. It's the only question we don't see her telepathic 'sparkles' or hear her listening on the answer.
It happened slowly and subconsciously, but despite the unflattering first impression Anya has come to care about Damian. She doesn't want him to be hurt or sad. She doesn't want to use him or take advantage of him the way she sees others try to (and the way a small subset of the fandom accuses Anya of trying to since they can't seem to grasp that Anya is at most six years old and hasn't thought as far as to how the fallout of Twilight's mission will affect the Desmonds). And she understand him a lot better than she ever realized. She trusts him with her deepest, darkest secret despite her fear and the uncertainty because she genuinely WANTS to be honest with Damian. It's her olive branch to him, after HE was vulnerable with her time and again when it comes to his family and his fear of letting others close after so many people tried to use him for his name.
Because more than anyone else, Damian has noticed her, and how intuitive she is of the thoughts of others.
And despite denying or deflecting it time and time again-- including intentionally bombing a few questions in this chapter to avoid standing out too much after Damian called her out again-- Anya FINALLY came clean to him about her powers.
And, of course, he thought she was messing with him, which in turn pissed HER off because this is her biggest secret, dammnit! XD
But despite Damian's refusal to believe her ATM, this isn't something Anya can take back, and Damian is perceptive enough of Anya that sooner or later he's going to realize that Anya was being honest with him. And it'll be a wild ride to see where things go from there.