I think there are multiple complex issues here.
The leak does not aspects of the property and how the tenant in choosing to live.
At what point in the leak was the council notified? It isn't really a reach to think that someone living such a chaotic existence wouldn't report the problem particularly promptly.
The builders/plumbers instructed by the council have a right to basic levels of health and safety, if the resident wouldn't work with the council to make the home safe for access then it may have become a bit of a stalemate situation.
The mental health act and mental capacity act are quite clear that an individual assessed as having capacity can live how they choose to live even if it falls well below normal societal standards. The quotes suggest that the tenant is fairly coherant. But obviously that doesn't mean that the council can't work with and support him, but only if they are aware of him and he chooses to cooperate.
At least he is out now and work, and support, can begin.