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.
By the way, I'm using the phrase "in circles" to indicate that the group keeps revisiting the same positions over and over again without making progress toward their waypoint. Then are not literally moving in circle shapes.