It was central to the point she was making. If the police arrested her for saying a man is a man, it would make headlines across the world, and if it went to court her lawyers, who are very good at what they do, would have a field day challenging this law. Most other people do not have anywhere near this level of access to legal support or media coverage.
But as they chose not to arrest her, this shields every other woman who might want to say similar. The argument being: if JKR can say a man is a man with impunity, then why can't anyone else?
So her making these statements of truth was a win either way. But being able to mount a solid defence in court, if needed, was essential to this strategy working.
https://x.com/jk_rowling/status/1775187763995824350