Amos Yee's condition require treatment and a MTO may seems to be in his best interest.

Without medical treatment, he will go on to create more trouble as he is unable to control himself due to his condition.

Already suspected that he could have some medical condition, because no one under legal threat will still continue to breach it without considering the consequences he will be in.