Many traditional values and conventions are modified over time. I am pretty sure that there was a "problem" with people not removing their hats 100 to 150 years ago becuase it all ahas to do with if you were taught these conventions and if you see a value to them.
Go to any major league sporting event and see how many people leave their hats on during the national anthem.
Unfortunately as ball caps have become the predominant hat type and they are treated more like a casual thing no one treats them like a hat in the old school sense anymore. I've noticed that even people in their 50's and 60's don't remove hats when visiting private homes or other indoor situations where 30 years ago I never saw anyone leave a hat on in those situations.
Wasn't the pledge of allegiance pulled from CA schools years ago? Flag etiquette has been lost to most under 40 unless they have been in the military or the scouts including how to handle a hat in those situations.