Why were hats more popular in the past?

by RPShep

When we hear about older fashion, it often seems like hats were part of women's and (even more especially) men's fashion: tophats, tricorner hats, etc. These days, they're worn but not part of formal attire and relatively rarely part of everyday attire--usually only in very informal settings. Why is that? When did the change happen? What factors influenced the change?

CORedhawk

We shower/bath everyday now. Hat's kept stuff out of our hair...and we didn't have to mess with our hair. We didn't have to look and smell other people's nasty dirty hair, and they didn't have to look/smell ours.

Factors: The invention of indoor plumbing and fresh clean water to bath with.

We also don't work outside where we need the hat for shade, as we moved from a rural agrarian society to a urban society.