How/when and why are Villagers guiding the sheep towards the tc?

Well the question is in the title.
I guess everyone has noticed, that sometimes when villagers take sheep nearby the tc they will kind of wave them under the tc first, before killing them.
Now the other day I had a situation where I sent out villagers to mill deer, and found two sheep, that I was missing before.
The enemy scout was around as well, and aimed to lame the sheep. As they were close to the mill I wanted to kill them with my villagers first.
Well, I couldnt.
The Villagers just refused to kill the sheep and instead proceeded to wave them to the tc, until the scout was killed them… So I am really wondering, when this behaviour is triggered and how you can circumvent it.


If a sheep far from Town Center and you right click with villager to sheep. This behaviour happens. It’s not efficient because your villager need to walk and sheep aren’t going to under the Town Center. They are going to under the Town Center. Sometimes villager kills sheep on the way. Idk how it decides to kill or send to Town Center.