There are several theories: As a spiritual gesture of giving up on vanity, because it’s more practical. The main task of a monk is to focus on meditation. So, styling their hair is not exactly a top priority. It’s also against Buddha’s teachings. It’s also possible that the monasteries at some point simply faced a lice break out. Shaving heads was probably the only effective way to get rid of the bugs.