Dogs that have been trained to herd sheep cannot be used to guard sheep. Without the direction of the shepherd, they will simply keep the sheep bunched up and move them back and forth and exhaust the sheep. Herding behavior is based on the hunting instinct and can involve nipping and biting the stubborn animal to get them to move. Without a human to control and call them off, this highly trained dog can easily kill. Sheep are as terrified of herding dogs as they are wolves.
Guard dogs on the other hand, at least those used for guarding sheep out of sight and on their own have had the hunting instinct bred out as much as possible and have been bred for protectiveness and territoriality and willingness to fight. If your sheep guard dogs bond too much to people, they won’t stay with the sheep.
I understand that. My dog (soon to be dogs) are not trained for either, but, the breed is good a both things. :)