The Texas Commission on Human Rights Act makes it illegal for an employer to enact policies of rules that harm the "terms, conditions, or privileges" of an employee based on a number of outside factors. Gender is one of these factors, which makes it so surprising that a Texas firm had a stringent policy that forbade employees from intermingling with employees of the opposite gender -- both while at work and outside of work.
The policy is no longer in place, but that has not stopped a former female employee from filing a gender discrimination lawsuit against her employers.
The woman claims that the policy made it difficult for the women in the office to advance. She also says it made it nearly impossible to socialize and collaborate with the male employees at the firm. The firm has 38 lawyers, 33 of which are male.
Studies have been performed that show employers are more likely to hire or promote someone who is like them. Therefore, policies of segregation like this clearly inhibit people who are "different" from the more senior employees (or the employees in charge of hiring and promoting).
It is highly improper for any employer to enforce policies that divide their workplace, but it becomes illegal when those policies divide the workplace based on an external factor. Anything that inhibits an employee's ability to move up or do their job based on things like gender, race, religion, sexual orientation, or numerous other factors opens the employer up to a civil lawsuit.
Source: AOL, "Texas Employer Barred Men And Women From Being Alone Together, Suit Claims," Claire Gordon, April 9, 2013