Why is it that chickens know where you want them to go so that they can head off in the precise opposite direction?
They're tucked up for the night and you hurry down to the coop to shut the door. That's when they decide they'd rather do some more foraging. They hop off their perches and scatter in six different directions. After all, if you're out, there must be some reason for them to be out.
Four chickens return. Two have forgotten where the door to the pen is. They hurry back and forth at the wrong end of the pen, thrusting their heads at spaces in the wire. ("It was around here somewhere...I swear that door was right here...it couldn't have gone far.")
The least effective thing to do is try to herd the errant hens in the direction of the door because, of course, they'll run all around the pen along every side except the one where the door stands open. If you walk away, they'll find their way back into the pen, at which time the other chickens will hop off their perches to see if the newcomers have found something interesting. After all, if they're out, there must be some reason not to go to sleep yet....