Hollywood pays good money for actors and wants you to be able to see their entire face, so often main characters won't wear helmets even in situations where they really should be wearing one for their own wellbeing, as demonstrated by the fact that all of the extras around them are wearing helmets into battle.

The same applies to characters not wearing hats in time periods or settings where there's a cultural expectation that they should wear a hat or a practical reason one should wear one like the weather, once again the extras will be wearing hats but not the main characters.

What are the most notable examples of this?