The justices said in a 6-3 ruling Thursday that the subsidies that 8.7 million people currently receive to make insurance affordable do not depend on where they live, under the 2010 health care law.