The court of public opinion is, typically, harsh, irrational, and less well-informed than the criminal courts. Therefore it would make sense to keep the identity of the accused confidential until there is a verdict, or at the very least a trial. An accusation of a crime alone can ruin somebody's life. The idea is to punish them if and when they are found guilty of something; not beforehand.