All herding dogs do that without a command. It’s just natural. The child does not always appreciated it, however.
When I lived in TX, my next door neighbor had a couple of teacup poodles — those little white, fluffy dogs that look like they’d break. Their college aged daughter brought home a Sheltie puppy that looked like a miniature Lassie. I’d look out my upstairs window and watch that Sheltie herding those poodles and their cat too. I’d just crack up.
Now, we had a strict leash law in that town, and I was not too happy when the Sheltie herded the whole shebang over to my yard and the dog catcher tried to give me a ticket!
“... the dog catcher tried to give me a ticket”.
He was probably thinking, “just how many critters do you have?” LOL. I did know one friend that had a Sheltie who would try to “herd” snapping turtles. He would drag the dog back to the house for fear that the turtle would give him a good old snap on his snout.