Why did men stop wearing hats?

The above picture from the 1923 English FA Cup Final (between West Ham United and Bolton Wanderers) shows all but one man wearing a hat. And the hatless man had probably just removed his to scratch his head as the photo was being taken. So why did the vast majority of men stop wearing hats…