It seems that up until some part of the 20th century hats were viewed as essential part of clothing, like shoes, hat-making was a huge industry. While earlier everybody needed a hat at some point it then became optional (like base-caps etc.) and even viewed as eccentric. When did this change happen and why?
There's always more to be said, but you might be interested in this past answer by me: "[J. F.] Kennedy despised how he looked in hats and usually refused to wear them - despite howls of protest from habderdashers whose hat sales took a precipitous downturn in the 1960s" (Barbara Perry). What factors led to the downturn in menswear hat sales in the 1960s?