Had he not entered a populated building there's a chance that he wouldn't have been shot. But in a split second decision the LEO chose to use lethal force to protect others. It's easy to sit back and make pronouncements on what should have been done sitting the safety of your home, with no consequences, and all the time you need to consider options. This officer had to make the call.

Perhaps the family should have noticed this guy was the kind who would have a 31" machete and the anger issues to bring it out when someone annoyed him. This can't have been his first expression of that kind of behavior.