how does this even help their own cause?
God forbid some young people might actually meet a trans person (or some other "othered" person) and think they're okay, and through this casual interaction and others like them coming to realize that, when it comes to inborn characteristics, people are all more alike than we are different.
If some statement or action separates groups and creates divisions between individuals, it helps their own cause, which is to control the populace by any means possible.
And they do like 'em young, in all sorts of ways, hence the extreme focus on young people charting an independent course, even a life path born of necessity such as being gay or trans. If you're gay or trans, you are already not going to fit into the little box they want to trap you in, just by default. You may force yourself to fit it, but at what cost? So you make your own way, and they don't want the other kids seeing that and thinking, hey, I could make my own way too.
Gay and trans kids prove to those who get to know them that there are many valid life paths, many different ways of making a good life for yourself that do not involve the usual narrative of getting married and having kids, and often that you can and will escape a family of origin that does not accept you as you are. That frightens authoritarians and controllers, a lot.
You know what else scares the bejeebus out of them? People accepting other people, talking with each other as their equals, and finding out they have the same shared values.
Plus, if they shut down a dance they think it reminds everybody of who's in charge, something a small town dictator will never pass up.