A federal judge ruled that the Trump administration broke the law, violated Congress’s authority, and had zero power to terminate BRIC funding.