EDIT: Realized a picture could be helpful.
{F3023664}
The distance from the AI group to the wp may be fairly near.
The length of the path the AI leader takes, from end to end, could be as much as several hundred meters.
Again, I've seen this behavior both when enemies are and are not near to the group.
My hunch is the ai is trying and failing to go around beaten zones.