Regardless of your sense of humor, posting somebody’s photo without their consent can be illegal in three ways: violation of right of publicity, defamation, violation of privacy. In addition to that, electronic harassment is a crime in many states, and there are cyberbullying laws as well.
So yeah, it’s not “brainwashing” that makes this a crime. There are a variety of ways that this can be considered illegal. It was not just a bad joke, there were specific ways that it broke the law.
That’s not to say I agree with the details of this story. I am very hesitant to have kids charged with crimes because it puts them in a system they may not belong in. I don’t know what a “junior felony” is, and what the result will be. But it’s a juvenile charge, not an adult charge, so hopefully it won’t follow him into adulthood.
The kid is only 14, that’s really young. I think there are a dozen ways they can teach him a lesson, and maybe the positive aspect of using the law is that they can take advantage of this opportunity to make him do some community service or something that will build some character.