The job of the justice system, and the police, is to keep non criminal people safe, all of them, even if it means not being able to catch a few criminals here and there. It's obviously not the case in the US though, just looking at wrongly convicted people gives you a good idea of what the US system is about [0]. This kind of shit should never ever happen, it's the very basis of any serious justice system.
Also, this is exactly why countries like France have laws preventing police interventions between 9pm and 6am (it obviously has exceptions, but even then they need a special authorisation). You don't storm people houses in the middle of the night and start shooting when the confused people you just woke up start panicking... seems like common sense to me
As far as I can tell you're legally allowed to own a gun and use it to defend yourself against intruders, you can't use this as a valid argument in that case. The only shocking thing here are the police tactics, not the fact that this dude defended himself.
[0] https://en.wikipedia.org/wiki/List_of_miscarriage_of_justice...