There are basic logical problems with this argument. First, the marriage laws are not criminal laws. Second, there is no circumstance under which facilitating or encouraging sodomy would be a part of public school instruction, just as there is no circumstance under which the schools could appropriately facilitate or encourage any type of sexual relationship.
More foundationally, it would violate basic principles of separation of powers and basic constitutional design to use the mere existence of unenforceable laws as a reason for federal courts to micromanage Utah school curriculum.
Article III of the Constitution only gives jurisdiction to the court where there are “cases or controversies” at issue, meaning there has to be a live dispute between parties. Thus, unlike some nations and even some states, the federal courts are not empowered to answer hypothetical questions or to opine on the wisdom of legislation in the absence of a real threat to someone caused by enforcing that legislation.
This means that the Constitution does not give power to the federal courts to “clean up” state statutes, even where those statutes cannot be enforced because of a court decision. In that instance, the laws are unenforceable and do not create a threat of prosecution or application that would invoke the involvement of the federal courts.
In fact, even valid laws – like the state’s law against polygamy – cannot be challenged just because under some hypothetical circumstance someone might get prosecuted.
The U.S. Constitution is, critically, a written constitution. That means its words matter. While it might seem tempting to ignore those words to give officials a little more room to accomplish things we would like to see done, anytime we ignore the Constitution itself to gain some pragmatic advantage, we risk far more than we can gain.