Because of this, it is utterly uninteresting to observe the peak of government power, like compelling the draft. The draft is specifically legally authorized in the Constitution, in which the Government is lawfully granted the power to raise and support Armies. It can do so while obeying the law. This is not "the whims of the courts," and the courts are barely involved, because the law is so very clear.
Quarantine powers are also subject to the power of law, including both general police powers and Constitutionally protected rights. When these conflict, there are a variety of legal tests to determine which wins, and there is legal precedent for interpreting the laws. When the courts interpret this conflict, it will almost certainly not be on a whim.