It is literally not their job. Their job is to interpret and enforce the laws passed by the body answerable to the people through elections. At least in the US, there is only a very limited federal common law, and there is no common law precedent for generically prohibiting intergenerational environmental impacts. There are those who argue the "public trust doctrine" should drive these outcomes, but again, no such doctrine has ever been applied to carbon emissions in the US (or even any other form of pollution). That would be judicial lawmaking. The idea that unelected black robes can fundamentally remake the US economy without legislative authorization is literally the antithesis of how it's supposed to work. That's not their job.