They come with it, but it's not very refined without training. They actually need a lot of training to not herd people, especially children. Since humans don't respond the same way as sheep the dog will keep escalating its herding behavior until it bites the human.
I heard an anecdote once of a couple that was camping in a dispersed area with their border collie and the dog ran away. They called and searched and were basically resigned to the loss of their dog, when at dusk they heard a huge commotion. Suddenly their dog drove an entire herd of elk through the campsite.