A way it could have been avoided is that there should have been adequate policing, but there is not.
There was an incident in the United States where a veteran opened fire on three young men, and the law of the land in the U.S. pretty much protected him.
When somebody is breaking into your home and you have children, a family, at what time do you decide that it's life-threatening? It might lead to a break and enter, but at the same time, do they have a gun or a knife? If you saw them, are they going to hurt you or kill you? As an individual, when do you decide if your life is on the line?
There are laws in this land that seem to pretty much protect the criminals. Do not engage with them, and do not harm them, but call the police. How can you call the police, though, when there aren't enough police?
You can forget about security systems. If there's a break and enter at a home in my community and the alarm is going off, but at the same time, there's a domestic violence situation happening somewhere else, the police are going to triage the calls.
Adequate policing is needed, but at the same time, laws have to change. I believe that one of those laws should mean to protect yourself if you believe.... It's a grey area, but definitely you should be able to protect yourself, to bear arms, especially when you have children. You're not thinking about yourself. You're thinking about your children's safety at that moment.