It’s an act of renunciation. In the culture of the Indian subcontinent of 2500 years ago, this was an outward demonstration of an inner resolve not to seek fulfillment in “affairs of the world”: career, family, possessions…
Having a shaved head made them publicly accountable. Monks were held to a higher standard of conduct and materially supported by the lay community. They’re holders of a public trust. With that shaved head, they couldn’t turn their monkhood on and off when it suited them.
It’s also a constant reminder to the monk or nun, because it has to be maintained. Every week or so, as the hair grows back, you have to renew that act of renunciation. It’s not a “once and done” thing, but an ongoing endeavor.
And finally, as @dabbler said, it removes a cause for self-concern. As a monk, you’re not tempted to devote much consideration to what look you want to create for yourself.