This reminds of the story from a couple years back about the high school vice principal who got charged with possession and distribution of child pornography. Some girl in the school took pics of herself and sent it to several boys in the school. The pictures started going around and the vice principal heard about, so he had some kid send the pic to his phone so that he could figure out what was going on and what to do about it. After he contacted the cops the vice principal then gets nailed.
Honestly, sometimes the way prosecutors and police officers prosecute crimes is just idiotic.
http://www.wired.com/threatlevel/2009/04/sexting-hysteri/
In some respects, Bean did the right thing. To everybody saying the guy "deserved it" or "should get sexually assaulted in prison" think about it this way. If some kid kills a dog and videotapes it, then uploads the videotape to the escapist forums, what would you do? Probably tell his parents or his school or something. You'd also probably send a copy of the video or a link to it so that they have evidence. Well, that's exactly what this guy did. For him to then get a felony conviction for doing what upstanding citizens are SUPPOSED to do is pretty messed up. Granted, he did it more to shame the kid than out of respect for the law, but it's pretty scary to think that you can get jail-time for that.
Honestly, if you read behind the lines it's pretty clear that Bean is just another unfortunate casualty of the current media frenzy over "cyber-bullying" so that actions that would be perfectly legal or get substantially lower punishments now rate jail-time. They wanted to "send a message" so they convinced him to take the stalking plea rather than try to fight the much stronger child pornography possession charges. So a law intended to stop continued and aggressive harrassment gets used to browbeat a guy because he is really guilty of another law intended to protect the minor, who put the pictures up himself.
And no, it's not the legal system at fault, or the laws in it. It's the humans who decide to apply the laws in 'novel' and interesting ways for purely extraneous goals.
edit: Oh, and to the guy asking about the picture his under 18 friend sent him, it would depend partially on your state's laws, but I'm fairly certain there's no age-based immunity for possession of child pornography. There are cases of kids getting charged for pics of THEMSELVES even.