It sounds like wrong place, wrong time for both the dog and the bicyclist. FWIW, in a case like that, (after once tumbling over the handlebars due to a dog) I used to get off the bike and get past the dog.
I wonder if it was the sound of wheels on a road coupled with a helmet.
Given the dog’s background, he may equate “helmet” with “soldier” and decided that he needed to protect his master from an unknown “soldier”