If science says that coffee is not a cancer risk how is a judge allowed to force coffee makers to put a warning label on their product?

Even though a carcinogen is used in very small amounts in roasting the beans, studies show that it is an insignificant amount in the finished product to cause harm. I don't think judges should have the power to legislate from the bench.