Public restrooms have not always been gender segregated. Historically, shared restrooms have been a feature of most communities, and this is still true in many countries today. In 1887, Massachusetts became the first state to pass a law requiring separate women's restrooms in the workplace. By the 1920s, most U.S. states had followed suit.
The problem, Elizabeth Nolan Brown writes, is that governments went beyond merely requiring all employees have a place to do their business and started specifying exactly how and in what ratios this must occur, in and out of the workplace. These days, America's public restrooms are regulated through state and municipal building codes that dictate exactly how many bathrooms buildings, businesses, and other public entities must provide, based on occupancy capacity. These codes also require the existence of separate men's and women's bathroom facilities. For advocates of unisex bathrooms, building codes—not bigotry—may be the biggest obstacle.