In court and in life you judge justification, legal and moral, solely based on the information you had at the time. The guy who "would have shot but didn't have a gun" only gets to feel good about the outcome due to chance. Same situation with actual intruder and he and his family are potentially too dead to apply hindsight.

People do need to keep doors locked, even (especially) if they are home. I've never understood why unlocking and locking a door when you use it is seen as a burden.