The 'field' they are operating on looks like a human habitat. The cobra probably ventured into the territory and the dogs were protecting the house, like they should have.
One of the places I lived overseas, we had a cobra living in the front yard. The only times we saw it, it was running for its home tree. Wanted nothing to do with us. We got some geese, as they had a pretty good reputation as snake killers/eaters, but that was mostly to deal with any small fry. That cobra's pretty big, ours was only 5' or so.