The appointment of the President is a reserved power of the 50 State Legislatures (+3 votes Congress gave itself in 1960). Courts have nothing to do with it, nor should they.
They did in FL a couple of decades ago. I don't see their decision as being wrong.