After meeting/rescuing the survivors in the church, Alice walks with them while explaining some of the situation. She leads the group through a graveyard.
At this point, Alice already knows that the T-Virus can reanimate the dead, so it seems like walking directly through the graveyard - where there would be a concentration of reanimated dead bodies - would be a terrible idea. As one would expect, they are attacked by infected rising out of the graves.
The reasoning for taking this route is not explained within the film itself, but is this explained in any of the supplemental materials (commentary, etc)?
Related question: how would those who had already been buried have been infected by the T-Virus? Most of them showed fairly advanced decomposition.