The CPG members killed and the General shot in this encounter are Hausas defending their people while the "bandits" are Fulani ethnic militia.
If you go to Social media like Twitter and read comments from Hausa netizens you will understand better
“Retired General Leading Zamfara Community Guards Shot By Terrorists - SaharaReporters.com”