This habit had puzzeled me before. I see guys with very short haircuts wearing baseball hats in a GYM 4 fuk sake!!! Why?
I wear one to the gym all the time. My hair is very fine and I have an oily scalp, and it's long enough that if I wake up with out taking a shower half of it is matted down and the other half is sticking straight out sideways. The hat is far preferable, believe me. I do the same thing if I need to run an errand early in the morning and I don't want to have to take a shower first.