This was, and (maybe) still is, a wisdom in Thailand, but for different reasons.
I was in high school in ~2002. My knowledge could be outdated. I hope they have changed this dogma.
Thailand enforced certain hairstyles on students until the end of highschool. For male, it looked similar what is shown in the post. Probably even uglier.
(Not all schools enforced it strictly. Some, especially private schools, let their students to have a better hairstyle.)
Anyway, we believed that these superficial decorations would make students being distracted from studying. Students would focus purely on look and etc. It's a "tradition".
Obviously, self-esteem was not a thing to consider back then.
This hairstyle rule turned good teachers into hair polices. Teachers were obsessed with whether your hair was too long. Long hair became the sign of disrespect.
When the movie, Speed, came out, Keanu Reeves had the buzzcut hairstyle which was shorter than what Thailand enforced. Many students thought "well, it's shorter and looks cooler. It should be fine". It turned out that cutting your hair shorter than what was enforced was also wrong.
One funny tidbit: I've learned a valuable lesson that Buzzcut in US is called Skinhead in Thailand. I told several people at work that I would get a skinhead. People looked freaked out a bit because skinhead was associated with something really really bad; I don't remember what. Then, one friend kindly pointed out that what I wanted was a buzzcut.
Edit: This article (https://www.wsj.com/articles/shear-follicle-thai-students-re...) captures the situation pretty well. And there's a photo inside which is accurate