That's the obvious point. Now this is an interesting way for someone to argue. In other words, the law itself is the final court of appeal on morality. In other words, there is no other higher appeal one could make. It seems to me that it's pretty evident that the courts do not decide what is right and good and true.
Courts decide what is legal.
Courts don't even decide what is just, frankly. Very little pertaining to the issue of justice goes on in the courts, it seems. The law is what goes on in the courts. So the courts decide what is right and what is wrong. Get used to the idea.