I'm going to go out on a limb here and suggest the same people who don't want a dress code on the golf course are highly correlated with those who don't want to wear a mask. It's the ol' "Nobody can tell me what to wear."
There are plenty of reasons for a business to have some dress code requirements. Some of it is tradition, a preference by ownership to project a specific image, some of it is to avoid individuals offending other customers. Some dress codes in life are implied, some are clear and explicit. I have no problem with dress codes. If I don't want to comply, I don't patronize that establishment.