I teach my staff to lock the cash drawer when they are away from the desk, not because the drawer lock is all that difficult to break, but because a thief takes up time and makes noise to break through it. In the same way, we make ourselves less vulnerable when we slow down potential invaders of our home and cause them to do something that attracts the attention of residents or folks nearby. Locks, lights, barking dogs, etc. are not absolute stoppers, but they might make someone pick an easier target. If this story is correct in its details, 19 other targets were found to be unsatisfactory before the BG found this one extremely soft target that he was willing to exploit because there was no time involved in turning an unlocked doorknob and no risk of detection from the noise breaking glass or wood, a barking dog, or an alarm.
Lots of other factors come into play before our hobby of firearms.