While there is some truth here, it's worth noting that firearms are far from a deterrent - these days, many criminals are often enraged by a victim having a gun and end up escalating further. Earlier this year there was a gang execution in Minneapolis that was prominent national news. The thugs were probably just going to kick the shit out of the victim, but when they discovered he merely had a gun, they took it from him and then held him down and shot him repeatedly in the back. Or there was another famous killing in Louisville about 6 years back. It started off as a simple night time home invasion but when one of the residents started to defend themselves by firing a warning shot, the perps responded by turning the home into a shooting gallery and ended up killing the other resident. So these days it's more of a toss up because we're not in the Wild West or even Paul Kersey's cities, but rather subject to highly organized crime that demands supplicating obedience and will readily retaliate against anyone who tries to defend themselves.
The warning shot was the main mistake. It goes against all training. Only shoot to kill.
If the homeowners had a shotgun it would have been over quickly. Shotguns don't miss.