Another perspective is that it might be the US constitution working as it was designed to work. The Founding Fathers were afraid of nothing more than tyranny, having had the recent experience of King George to guide them. So they set up a system - which has come to be called “checks and balances” - to ensure that tyranny never took hold in the US. No President or branch of government would ever have the power to rule according only to their own will.
Being elected was never, and is not today, an indication that the winning office holder’s position on any issue was or is constitutional. And while US courts have been and can be somewhat political from time to time, overall, the system of checks and balances has worked well for over two centuries.
Those with some background in history might recall the troubles the FDR had with the Supreme Court, and that one of his proposed solutions was to increase the size of the court to pack it and try to get decisions to go his way. That obviously failed, but the lessons are there.