If the series stays faithful to the comics on this plot point — and it seems like it's going to — Hershel has already given his justification for imprisoning the walkers.
SpoilerHe believes that a cure for the zombie virus will be found and is keeping those people "alive" so they can be saved.
Unfortunately, his good intentions are going to cost him dearly.