This article is very worth a thorough top-to-bottom read. I especially like a paragraph from farther down in the article where the author brings up an issue that often comes up here on Hacker News: "According to Pauline Kim, a professor at Washington University Law School, people tend to make inferences about the law based on what they know about more informal social norms. This frequently leads them to misunderstand…
I'm a perfect example. My wife was telling me that her sister's workplace required women to wear skirts. I told her that was absurd and could not possibly be legal. I was wrong. I believe in nutshell that all that is required is a consistently applied dress code (pun intended I guess) and not violating religious beliefs. I was stunned.
It doesn't make it a good idea for a specific place, but, well, the purpose of the law is not to provide "good idea" guidelines for every scenario, or to prevent people from making bad decisions. It's only supposed to prevent them from making illegal ones, and that's not the same in any way.