In Chinese mainland, military training in colleges and universities is a statutory national administrative activity, which is organized and implemented by the national education department and is a part of the school's education and teaching tasks. Students should attend according to the arrangement of the school. Therefore, military training in universities is not illegal. Compulsory haircut during military training is also a part of military management and military training, and it is not illegal.
However, based on the principle of individual free will, some students may hold different views on participating in military training. In China, the protection of individual rights is a basic principle of national laws, and students should also enjoy certain rights protection in military training. Therefore, if students have objections to military training, they can express and safeguard their rights and interests through legal channels, such as applying to the school for exemption from training and putting forward reasonable requirements for not having a haircut.
In short, military training in colleges and universities is a legitimate state administrative activity, and students should participate in it according to the requirements of the school. However, students' personal rights should also be fully guaranteed.