The black man got shot because he attacked a man who had a gun.

It's really not complicated.