One thing I notice about public transport - especially the London Underground and double decker buses in general - is my head often touches (or is very near) the top without wearing a hat. So, I am not sure how the story holds up. Unless previous generations were substantially shorter?
I think it has more to do with class in the UK. With each generation, the class division has faded, and to a degree, hats were one way of advertising your class. Even today, baseball caps are seen as part of the uniform of the "underclass" (that is, when they aren't worn by sports people).
People on average have been getting taller for a long time. The general assumption is better nutrition and fewer diseases = taller populations. A lot of old clothing looks tiny by today's standards.
I think it has more to do with class in the UK. With each generation, the class division has faded, and to a degree, hats were one way of advertising your class. Even today, baseball caps are seen as part of the uniform of the "underclass" (that is, when they aren't worn by sports people).