The ultimate workwear fabric, denim has always been an American wardrobe staple for at least the last 80 years. While the fabric has become perfectly fine to wear from the workweek to the weekend, vestiges of class-based dressing strongly forbid the fabric on the grounds that it is far too casual. Exclusive (read: white) country clubs, the Ivy League men's clubs, and upscale restaurants are generally the last locations to uphold the “no-denim” rules—and many of these have shrugged off the archaic denim restrictions in favor of either increasing membership or accommodating contemporary sensibilities.
If you want an example of how denim was barred from entering the establishment, get familiar with the tale of working-class hero Bing Crosby's rocking a denim tuxedo. Originally conceived by Levi's after news spread about Crosby being rejected from a hotel for wearing denim, the label produced a full-look tuxedo, complete with red tab corsage with custom rivets. Crosby was eventually seen wearing the denim tux in a few public appearances, and while a denim tux is a novelty that only Bing Crosby could pull off, it was the celebrity endorsement that proved the rule was on its way out.