On just wars and COVID quarantines

People say, “Killing people in a war is worse than quarantining them!” True, but that may be irrelevant. Destroying the livelihoods, etc. of innocent people is not as bad as killing them, but it hardly follows that it isn’t extremely bad. And since when is a government morally permitted to inflict whatever damage it sees fit on innocent citizens, as long as it stops short of killing them?