"Do not let the hair of your heads grow long"Leviticus 10:6.

The kohanim (priests) are enjoined not to enter the Holy Temple while disheveled with unkempt hair, as is the custom of mourners who don't comb and arrange their locks.

According to an alternate version in the Midrash, this prohibition bans a priest from growing [inordinately] long hair.

The high priest is always bound by this prohibition, even when not in the Holy Temple.