In a 7-2 ruling, the court struck down a lower court ruling and said the plaintiffs, Texas and 17 other GOP-led states, did not have standing to sue.