I think if the couple had more situational awareness this invasion might have been avoided.
It doesn’t take long for a suspect to advance on you, even if it seems they’re at a great distance. The suspects in the video below went from not being seen to inside the apartment in about 4 seconds.
There isn’t much to discuss here outside of the obvious: When entering your home, close and lock the door behind you immediately. Additionally, have a plan for a home invasion, and discuss it with others that you live with.