But they didn’t decide it directly and arbitrarily, as OP is suggesting might have happened. The power to elect the President is in the hands of the Electoral College, and the House of Representatives. The most that a Supreme Court can do is tamper with the process of tallying the popular vote.