Something else that may have contributed to this change: after the late 19th century. most buildings in larger towns and cities had indoor plumbing, so chamber pots- containers in which people deposited their waste- went out of use. One of the worst things about being a servant was that you had to empty every chamber pot in the manor, and the way most servants emptied them was to pour out their contents from the nearest balcony, which was usually facing a public thoroughfare. Wearing a hat protected your clothing from being coated with the contents of chamber pots being emptied from above. They usually didn't show that in all those costume dramas featuring Laurence Olivier and Merle Oberon and the other legends of the screen.