Pledging allegiance to something, Nazi German did it on their physicists, making them to Nazi ideology during 1930s, Deutsche Physik as opposed to Jewish physics (relativity). Mao asked all intellectuals to pledge allegiance with communism regardless of their being members of CCP or not. I know it's the idea from university's administrators, not from professors. It seems all bureaucrats in the world think alike, whether in Nazi German or in Mao's China or in U.S.
Link: https://www.realclearinvestigations.com/articles/2018/10/18/i_pledge_allegiance_to_diversity_and_to_the_tenure_for_which_it_stands.html