Anonymous isn't putting them behind bars, but by releasing names, communities can ostracize these people and keep them away from children.
More seriously, you hit on the problem, which is that a lot of people seem to be assuming that Anonymous' vigilante justice is error free. Those that are wrongfully accused of using child porn could have their lives seriously damaged.