I have not always had long hair as I do now.
When I had short hair I never needed headgear whilst I ran. But I was known for wearing various bands at university whenever I played sport. It became part of my style and I was nicknamed Björn Borg, the famous ex-tennis player.
However, since needing a hair band to contain the wildness of my shoulder-length hair I use either a headband or skull cap as a necessity.
They keep my hair from getting in my face or swinging behind my head, and protect my head from direct sunlight or from the bitter cold. Headgear also hides any times when my hair is not in its best condition.
But there is another reason.
Headgear is an important indicator of effort level during and after a run. If my band or cap is wet, and not from rain, then it shows a high sweat rate and that I should rehydrate more than usual post-run. If my headgear is comparatively dry then this should correspond with running at a lower intensity and relatively shorter distance.
I often choose one of my two black headbands, but I also own a multicolored one that I tie-dyed, and a black skull cap.
I always turn my headgear inside out so that I do not show the brand name. This is one of my pre-run rituals that continues to make me unique.