A functioning state means there is a government to exercise sovereignty over the territory. There area legal system and police who claim a monopoly on legitimate violence. The flip side of this monopoly is that they must exercise it on behalf of citizens who have been wronged.
But a democracy also respects the rights of their citizens, including privacy. The only time I've seen on-duty police in my home was when I reported a bicycle theft from my back yard. They don't drop in for random checks where I live ...
This principle can become turning a blind eye, as when the Catholic Church got away with investigating and obfuscsating sexual abuse by themselves. Or when various churches decided to offer sanctuary to refugees who were to be deported. What these cases have in common is that the government refrained from enforcing laws for fear of public backlash. The church has a good reputation with people who normally back the state institutions, and so the government agencies simply find other crimes to investigate before they open that file.
A different mechanism applies when there are people who normally hate the state institutions, and if the government agencies decide to pick their fights carefully. Some time ago, in Berlin, squatters were evicted from an occupied building. The police deployed roughly 30 officers per squatter, because they expected violent protests by part of the community. This action was planned and authorized by senior police and political leaders with a significant lead time, while a normal eviction involves one bailiff, perhaps one patrol car, and possibly a few hired movers. A critic might say that the squatters got away with defying court orders far longer than an ordinary eviction case, because of government fear.
Your mental institution would probably use the first option.
- Assume strong protections for patient confidentiality, with fearsome lawyers to back it up.
- Assume that powerful people were able to have inconvenient relatives declared insane and admitted, either to keep them out of a jail or to keep them from exposing a scandal. Now the doctors have phone numbers on quick-dial.
- Assume that the general public is familiar with people making "wild" claims every decade or so, and the "whistleblowers" being declared insane by the medical expert witnesses and the legal system.