Harmonious Hobo is a currently healthy fellow, in a popular webcomic that I read, who lives in a the small town of Esk that has suffered mysterious deaths that authorities don't fully understand; it may be a form of disease. This outbreak appears to be confined to only a couple of small towns at this point. It doesn't appear to have reached major cities or a widespread area yet.
One local doctor-in-training has provided a report on the phenomena to authorities, but her report was incomplete and in any case, was not viewed as credible. The only other doctor in town has died from the cause that impacted the people she helped him treat, and she has requested additional medical assistance. The townspeople have mostly been staying inside their homes or seeking shelter. The town has been surrounded by soldiers who are preventing anyone from leaving the town, people would could spread the ill understood plague. But, the six soldiers available couldn't enforce a quarantine by force on the entire town.
So far, this is a tale of standard, widely accepted public health protection through quarantine coupled with typical government underfunding of public health measures.
But, there is one twist. Rather than broadcasting the quarantine, it has been kept secret. Only those who try to leave are informed that it exists. So far, the general public doesn't have any reliable information that it does. Even after credibility challenged Harmonious Hobo's report, if he makes one, the general public still won't be able to trust the credibility of his report.
In the absence of knowledge of the quarantine, few members of the general public would leave. It is that kind of place. If the quarantine became known, more might try to break quarantine and flee to save themselves from heightened risk of exposure to the dangerous situation and for the vast majority of those fleeing, that would be a rational self-interested action that wouldn't hurt anyone. But, some might bring the problem with them, and there is no way to tell who, as the cause of the situation is underdetermined (so far as the authorities are concerned, at any rate).
Is there anything wrong with not telling people that they are detained when they aren't trying to leave? If so, why is it wrong?
Similar questions arise when someone is questioned in a situation when they believe they are free to leave, but in fact, are not. But, there, the issue is whether the statements made are subjectively voluntary, and the appropriateness of the use of deception by law enforcement officials to prevent and investigate crimes is well established in many cases. This is a public health situation that balances individual liberty, self-preservation and transparency interests, against demands upon public resources and threats to public health.