The Court wrongly decided the matter. It should have immediately lifted the moratorium.
Historically, governments have held "inherent" police powers to protect the health of the citizenry. But the federal government is different. It was never intended to have inherent powers. Our American ancestors would never have accepted the Constitution if it was calling into existence a government with inherent powers.
Instead, the powers of the federal government are limited to those enumerated in the Constitution. If a power isn't enumerated, it cannot be legally exercised.
The Constitution does not delegate any power to the federal government to enact laws to protect people's health. Therefore, the CDC's eviction moratorium is illegal under our form of government.
The matter is aggravated by the fact that Congress, which is supposed to be the entity that enacts the laws, didn't even enact this particular eviction moratorium. It was established by a decree of the CDC, which is nothing more than a bureaucratic agency within the executive branch of the government.
How is that different from what totalitarian regimes do? The ruler in those regimes or his designated bureaucrats simply issue decrees that have the force of law. They don't bother with legislatures because usually they don't have legislatures. That's what makes them dictatorships.
There is an amusing part of the Supreme Court's decision. It's the opinion by Justice Brett Kavanaugh, who was appointed by President Trump under rather auspicious circumstances. According to an article on CNN.com, Kavanaugh agreed that the CDC's moratorium was illegal. But he said that he would permit it to stand since the CDC intended to lift it on July 31 anyway. So, under Kavanaugh's reasoning, it's okay to let an illegal action stand so long as the government is promising to stop it in a couple of months or so. That's what passes for sound legal reasoning in Kavanaugh's mind.