Last week, 6,000 workers of a Pennsylvania company achieved a small victory. A federal judge ruled that their employer, American Future Systems Inc., has to pay up for making them clock out for bathroom breaks.

The company will have to put out about $1.75 million in back pay and damages for forcing employees to clock out at offices in Pennsylvania, New Jersey, and Ohio between July 2009 and July 2013, according to a report by the Philadelphia Inquirer.

But surprisingly, making employees clock out to pee is technically legal. The Fair Labor Standards Act (FLSA) doesn’t require companies to pay for breaks that are under 20 minutes. Back in 2009, American Future Systems issued a written policy declaring that workers could take breaks “at any time,” but those breaks wouldn’t be paid, and cited the FLSA in its defense in the suit.

Many of the company’s employees are telemarketers who offer subscriptions to the company’s 20 newsletters that include titles such as Keeping Up to Date on Payroll. Employees are paid an hourly rate of $7.25 and a bonus based on sales. In 2012, the Labor Department filed a lawsuit, saying the company violated the FLSA because employees couldn’t earn the minimum wage of $7.25 per hour if they had to clock out every time they had to go to the toilet or get a drink.

But this is not an obscure case of employers nickel and diming their workers for every minute of their time. Other well-known companies have been sued for docking employees for breaks or other brief time spent at work not working.

For instance, a class action suit against CVS is pending a decision in 2016. The case involves hourly call center workers who put in more than 40 hours per week doing various tasks prior to signing on to the phone system, such as booting the computer programs and logging in, initializing and accessing customer interfaces and portal systems, and checking alerts and emails directly related to their jobs. Even though they were clocked in, the employees say they were not paid the requisite overtime, adding up to thousands of dollars per year, per employee.

Maximizing the output of people without really valuing them is shortsighted and isn’t sustainable.

Although there hasn’t been a class action suit brought against a company for this yet, it’s worth pointing out that with more women than ever in the workplace –especially as heads of households with children– the FLSA doesn’t totally protect new mothers if they take time to pump at work. The employer is required to provide break time up to one year after the child’s birth, but they are not required to pay the employees for these necessary short breaks, and a company with less than 50 employees doesn’t have to allow even unpaid time to pump at work–an act that for nursing mothers is as physically essential as going to the bathroom.