Mike, I have heard that before, and I understand the point of view, but I disagree with it.
I grew up as blue collar as you can get...both of my parents were immigrants and my dad was a bus driver. So as a "general golfer" as you describe, I was as "general" as it gets.
I had a friend in HS that was a member of a great private club, and even I, with my limited means, knew that I had to dress better there, than I would in my normal escapades sneaking on Golden Gate Park par 3, Lincoln Park, or Harding.
It is just lazy and inconsiderate to expect that a dress code is "outdated" or "shouldn't apply to me".
As a family we have visited the Alisal Ranch more than a dozen times. For dinner, a jacket is required. That requirement is repeated to guests over and over...so no one should be surprised. But still, some guys show up at the dining room without a jacket, and often wearing denim. They have a closet of blue blazers for that purpose, but the fact that they even need it is amazing to me.
Anyway, my view is that if you are visiting a private club, dress appropriately. It isn't a big ask.