Sorry, but this principal did the wrong thing. The motivation might not have been wrong, but it was a very poor decision.
Let these kids make their choice and walk out of class and deal with the repercussions. If they do it again tomorrow, so be it. Ultimately, when grades/graduation become a real risk, all students but the most extreme SJWs will return to class and realize that they don't get their way just because they want it.
Teens have been protesting stuff like this for decades ("What do we want?" "Vending machines!" "When do we want it?" "Now!!"), but it seems they are feeling more and more empowered to make threats that end with adults caving.