At the end of another momentous term, the Supreme Court has issued major rulings that will reshape the law. Like much that the court does today, these decisions, in areas like administrative law, have been widely criticized as corrupt or illegitimate.

For the most part, this criticism does not give the Supreme Court enough credit. In case after case, it has rightly emphasized the importance of turning to historical understandings in deciding constitutional cases rather than imposing modern policy views. Most of the court’s decisions are principled and sound — most but unfortunately not all.

There were two particularly salient blemishes on the court’s performance this year — and they are particularly unfortunate because they related to Donald Trump.

Still, for most of the term, the court based its decisions on historical understandings. Perhaps most significant, it has imposed important limitations on the administrative state, sharply limiting the ability of agencies to impose regulatory fines without a jury and holding that courts, rather than agencies, will be in charge of deciding whether ambiguous laws forbid new agency initiatives. The court has also increased the power of cities to displace unhoused people from public spaces, curtailing an activist string of rulings from the Court of Appeals for the Ninth Circuit. In these cases, Justices Sonia Sotomayor and Elena Kagan dissented orally from the bench. Yet the same logic has led to some victories for the Biden administration, too.

The court rejected an important challenge to the Consumer Financial Protection Bureau’s appropriations structure in an originalist opinion by Justice Clarence Thomas, with an emphatic concurrence about the importance of history joined by the cross-ideological group of Justices Kagan, Sotomayor, Brett Kavanaugh and Amy Coney Barrett. The court upheld a federal gun control statute dealing with domestic violence by an 8-to-1 vote, with many justices thoughtfully discussing the role of history in shaping these cases.

In other high-profile cases, the court has insisted on enforcing the Constitution’s limits on judicial power, rejecting challenges brought by conservative activists because they lacked standing to bring those challenges into federal court. In doing so, the court showed that the doctrine of standing, which has often been used to curb lawsuits by environmentalists and consumer protection groups, can also be used to block right-wing lawsuits and is not just a shield for one cause or ideology.