Here's what the above idiom means. If something awful happens to someone you don't know, or perhaps dislike, you are likely to ignore it in the first instance, or may even applaud it in the latter instance. If something awful happens to you or your loved ones, well, that's a different story altogether. There will be no applause from you; there will be scorn and retribution if you can make that happen.
Suppose a fence-jumping, wall-scaling illegal immigrant entered your home and horribly mutilated and murdered a member of your family . . . or maybe even your entire family. Unfortunately this has happened in the US on too many occasions. After the fact collective anguish on the part of American voters contributed to the election of Donald Trump who promised to build a wall to keep such perpetrators away from you and your family. Further, Trump has directed authorities to wage an all out war against the notorious gang of illegals from Central America known as MS-13. They number in the thousands and their activities are too horrific to describe in this civilized publication.