Just look at any photo or documentary film about Japan and Japanese military during WWII and you will see they all had the horrible buzzcut haircut. Meanwhile, U.S. military, including Marines, had regular haircuts, some of which would be considered too long in today’s military.
Aside from practicality, it’s a cultural thing in Japan. Indicates seriousness. Still noticeable at times on sports teams to discourage individuality and encourage team play.