They do indeed have a right to refuse service. Ask any number of restaurants that require a collared shirt or a tie. Dress codes can be enforced all day long.
You may not refuse service based on race or religion or the other protected classes. But yes, you may indeed have a dress code in a restaurant.
There are a couple of bakers you might want to ask about that right,
You are hilarious! I've never been to a Twin Peaks establishment, and never will, but it appears hardly enough "dress" there on the part of its servers to even establish a "dress code."
And believe me, if there's not enough fabric there for the servers, kinda hard to create one for the customers!