one does wonder why you open the door to some random stranger and point a gun in their face?
I agree that if he felt danger, he should have left the door closed, but let's play that out. What happens next? The cops are going to find a way into that house, probably through the door. He has even more reason for fear, so he opens fire on them. They shoot back, possibly after he's hit one or more of them. Most likely, he ends up dead or badly injured anyway.
I agree that it's hard to hold the cops fully responsible IF their story is true, but as HidingfromGoro notes, that's a big "if" considering that it's the only version available and there are plenty of other potential sequences of events that would leave these only witnesses on the hook for manslaughter or worse.