We thought we had it, though. The whole idea behind the EPA's charter is that it's empowered to regulate harmful materials for the benefit of public health and the environment.
This is a technicality (letter, not spirit) legal argument the court is making: the chemicals in question have a long history in industry, because when they were introduced we didn't know they were bad. Now we do, and the EPA banned them.
But no, say the clever supervillains on the Fifth Circuit: the specific rule under which the EPA issued the ban was intended for new processes, not old ones. So they have to issue a different regulation under a different statute. Which they totally have the legal power to do, but because they didn't do it exactly right the court says the whole ban is ejected and we can go right back to making poison.
A reasonable court would have directed the EPA to correct its process and given it a reasonable deadline, but left the ban in place for obvious reasons. But... yeah, this is the fifth circuit.