The professor has put it quite well, and this also enables the police to come. Even if a charge isn't laid, the police can at least come and tell them they're committing a crime and they have to get out of there right now. This has real value.
I would add that part of the purpose of the Criminal Code is to correct, and that's why even though charges may not be laid, if some kind of restorative justice is done, if the person gets the psychiatric assistance he needs, that may also be of benefit, because part of the Criminal Code is to correct when there has been a breach.