The majority opinion, written by Chief Justice John Roberts, overturns Trump's decision to end the program on the basis given at the time.