The same thing they did when first finding / securing the prison--which had a partially destroyed fence, a giant hole in one of the walls, and walkers in the yard, not to mention the halls of the prison. Or, the same thing when inmate Andrew flooded the yard/halls with walkers. The other advantage was an increase in firepower, which was effective against the massive herd faced by Rick & Carl. Ultimately, they were in the prison, and modified it to suit their defensive needs after (what is assumed to be) more than a year inside, so it is impossible to think they would have positions set up in case of a walker invasion? Even in sci-fi/horror/fantasy, certain established rules matter, or there's no consistency. Michonne could walk in the middle of a pack undetected, yet Andrea had to kill a walker near the prison entrance, despite the use of another as "camouflage."