'Need not be worn' is a very weak statement and contains no element of compulsion.
'Shall be worn except' would be a better statement - except that the list would need to be considerably longer, as otherwise it would then be contrary to QRs not to wear your hat whilst having a crap in uniform....or rather, when in uniform having a crap. Or indeed, unless you're a Mess Hand, when dining in Mess!
Berets? Oh dear.....