Don't be too sure
I can assure you that no one wants to have sex with Ms. Versace.
That was me. I clealy remember the encounter and how he looked because at that moment I had a decision to make. Do I not follow the rule and decide "you look good enough" and seat him. Or do I follow the rule and turn him away, thereby relieving myself of making decisions on guests attire that some could view as arbitrary. I eventually got rid of the rule altogether, with nary a customer complaint. In my years manning the front of upscales restaurants, there was no shortage of perfectly atrocious attire that fell within the guidelines of the dress code. And there were many instances where guests were turned away, despite looking clean, polished, or presentable, because they were in violation of the "rule". My decision to lessen the dress code requirements was because (1) I found the hard and fast rules to be constrictive, (2) the rule was were detrimental to my business, (3) I thought the restaurant should strive to be inclusive, rather than exclusive.
Now one could argue that the other example another person gave where a guy walks in to a restaurant with a nice jacket and really expensive designer blue jeans. Technically against the dress code of the restaurant? Sure. The degree of this person and someone walking in with say, really lousy looking jeans -- say they are clean, but really worn, or maybe they are out of fashion or whatever. And this other person is not wearing a jacket. Clearly there is a difference between the degrees of against a given dress code or policy or implied dress code vibe of the place of these two examples.
It was a nice restaurant, and 99% of the guests STILL chose to dress up. I honestly cannot remeber a guest complaining about the attire of another guest in the five years after the rule was removed.