If you look at older black and white photographs of public spaces in the USA, like this one, you can see that hats were once much more common than they are today. What happened?
The Hat Thing! Anyone else with more insight on the matter is more than welcome to provide further answers; for the meantime, I commend to your attention this previous post from u/mimicofmodes which deals with the Hat Thing.