I agree with what you're writing here. The courts are restricted in this manner, but they also have the power to impose remedies and to come up with solutions when there is a constitutional issue, when two or more laws come into conflict (fixing an incongruence or contradiction in the statutes), when there is some practical or real-world obstacle, or when there is a dispute between the branches of government, and this often involves making decisions and giving actual orders not just telling the legislature to rewrite the law.
With respect to PA law there were two things that compelled the PA Supreme Court to make its decision
PA did it. I posted this two times previously in this thread. I guess you didn't read it. I sincerely hope you read it this time:
Nevertheless, we find the Commonwealth Court’s rationale in In re: General Election-1985 germane to the current challenge to the application of the ballot received by deadline. In that case, the court recognized that, while neither the Constitution nor the Election Code specified “any procedure to follow when a natural disaster creates an emergency situation that interferes with an election,” courts could look to the direction of 25 P.S. § 3046. In re General Election-1985, 531 A.2d at 839. As noted, Section 3046 provides courts of common pleas the power, on the day of an election, to decide “matters pertaining to the election as may be necessary to carry out the intent” of the Election Code, which the Commonwealth Court properly deemed to include providing “an equal opportunity for all eligible electors to participate in the election process,” which in that case necessitated delaying the election during a flood.
We have no hesitation in concluding that the ongoing COVID-19 pandemic equates to a natural disaster. See Friends of Devito v. Wolf, 227 A.3d 872, 888 (Pa. 2020) (agreeing “that the COVID-19 pandemic qualifies as a ‘natural disaster’ under the Emergency Code”).
Under our Extraordinary Jurisdiction, this Court can and should act to extend the received-by deadline for mail-in ballots to prevent the disenfranchisement of voters. We have previously recognized that, in enforcing the Free and Equal Elections Clause, this “Court possesses broad authority to craft meaningful remedies when required.” League of Women Voters, 178 A.3d at 822 (citing PA. CONST., art. V, §§ 1, 2, 10; 42 Pa.C.S. § 726 (granting power to “enter a final order or otherwise cause right and justice to be done”)).
I think the best response to this question is the one I wrote above. The state Supreme Courts have the power to change how elections are held under certain very limited constraints. They can't just change things willy nilly. There has to be a good reason. For example, is the law unconstitutional, is there some other statute that is contradicting another, is some specific action the executive is engaging in in compliance with the law, etc. Sometimes there is a dispute as to how things should be done and it's at the courts where we resolve those disputes.