The issue is that two separate matters were combined - wrongly.
The chap was let go on an accusation of rape. That's case 1. In the process, some labelled him as a POTENTIAL danger, which is where the SRO came in - case 2.
However, the process for the SRO is where the unfairness hides. If he is deemed to be at risk, he should be entitled to a proper review. At best, this order should have been temporary to manage the perceived risk so that a formal review by qualified people could be eventually obtained - police nor judge should be in a position to claim such expertise. If that review still comes to an "at risk" conclusion, the next question is what you're going to do with this guy. If that review does NOT come to the same conclusion, we're not just talking about an "OK, carry on" reversal, we're also talking about potential repercussions, and I suspect this is what keeps this game awry: it could get costly in terms of compensation.
Further, if there IS an "at risk" condition, you can't just boot him onto the street and assume that will somehow sort the problem - IMHO, the reverse is true, and I can't help getting the impression that the aim is to push this guy over the edge. Personally I find it proof of his sanity that that has not yet happened.
It's all very, very dodgy, and should worry anyone who is thinking about seeking psychiatric help.
It should also worry anyone who is NOT seeking such, as those who would normally seek help and thus manage a possible risk have now received a signal that such could actually be seriously detrimental to their life. Not good, not good at all.