Experience, maybe.
When I looked for the video, I searched under Herdenschutzhunde, since I knew there was a Swiss video of dogs scaring a bear away on Youtube.
Apparently it isn't there any more.
But I did find an interesting one about wolves and herd dogs ( In German, so I didn't post it here) one of the interesting things it said was that old wolves who know what it costs to tangle with big herd dogs will check out a herd of sheep and if dogs are present, mosey off with their pack.
Normally there are several dogs working together, and if that bear has messed with herd dogs before, he might know that they are bound to show up, once one starts barking.